ship icon indicating copy to clipboard operation
ship copied to clipboard

Improve UX around existing file paths

Open dexhorthy opened this issue 5 years ago • 2 comments

This is a big issue and warrants some deeper design. Right now if ship wants to write a file to installer/ or base/ or any other directory, and that directory exists, everything blows up.

dexhorthy avatar Mar 21 '19 20:03 dexhorthy

Do you know if this happens with ship update or just ship init? Because IMO that would really break update...

laverya avatar Mar 21 '19 21:03 laverya

I think ship update and other headless workflows will automatically copy folders to .bak before overwriting. We can talk about doing this for headed installs too, but it means you only get one rollback. We used to copy to .bak.TIMESTAMP but that got really gross.

I'm thinking of something a little cleaner like tracking ship-generated files in .ship/state.json with their checksums, or staging things out somewhere in .ship before copying out into the CWD. I don't know. There's a lot of options and probably a decent amount of prior art here.

dexhorthy avatar Mar 25 '19 19:03 dexhorthy