Closed phocks closed 1 year ago
I think this is worth taking more seriously in light of the parallax kerfuffle. The longer we go on, the higher the chance someone will randomly choose a project name that's been used previously causing all kinds of (probably invisible until damage is done) havoc.
I'd say we want a // 5a ...
at about https://github.com/abcnews/aunty/blob/master/src/cli/release/index.js#L115 and a // 3.5) ...
at about https://github.com/abcnews/aunty/blob/master/src/cli/deploy/index.js#L69 which just check for the existence of the target directory and ask for confirmation if it exists.
The above comment no longer makes very much sense to me. But I just went to deploy a new project with a fairly generic name and got nervous about the existence of this issue all over again. 😬
Yep. It's definitely an issue. I can probably dedicate some time and implement it sometime, unless anyone else wants to tackle it @drzax @colingourlay @jtfell ?
Having a bit more of a think about this. I'm thinking it would make more sense to check when first naming the project instead of on every deploy or release, because we really only need to check 1 initial time and then the rest we actually do want to write over to the same directory because it will be from the same project.
Closing this issue now 🎉
Just had a thought that I thought I should bring up. Currently if someone has aunty and chooses a project name that is the same as a previously deployed project, I believe the default behaviour is to overwrite the content on the FTP without warning.
I'm thinking it might be a good idea to maybe build in a warning if a project already exists on the FTP in /www/res/sites/news-projects/