-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-Clean Backup and Maybye Restore on Error #6
Comments
The backup would be nice and allow us to automatically reset on failures (so you aren't left with a bunch of files that sale Probably would want to make it controllable via a param A second command |
maybe the param isn't needed... I guess it would only be if someone didn't want the command creating a |
i'd vote for it just being used if something went wrong, i.e. if something errors don't put the onus on the user to recover it, but if they just screwed it up (say they ran clean with the wrong org) the onus would be on them to use source control to clean it up ... |
released in 0.0.3 |
so how is this working? was using today and got an error about an unexpected file due to some merge conflict artifacts, but wasn't automatically restored, but maybe there is an extra step? ran plugins update, and pulled down the latest code for my local version from master, could have messed that up and ended up using an old version |
https://github.com/ChuckJonas/force-source-clean/blob/master/src/commands/force/source/clean.ts#L86 I only did very limited testing, so it's highly possible there is a bug. Looks like it's only handling errors on the Next time, please zip your project so we can reproduce. You can run |
sending you a zip, although fairly easy to reproduce, just copy any class and change to MyClass.cls.orig to mimic a merge artifact output
|
@ChuckJonas scratch that, the example repo i had was pretty big and was taking forever to upload, a lot easier to just have you copy an apex class and add .orig suffix and then run the command |
@ralphcallaway What do you see when your run I've tried to repro this with both the steps above and the topcon project (both from source and via the npm install), but can't. Maybe I just don't have the right repo steps... |
Seems inevitable that there be a fair amount of stuff like #4 where it doesn't complete and all the files are "DELETED"
Recoverying with source control is a snap, but it's easy to mess something up and forget some of your stuff wasn't committed.
A small protective measure would be to save a backup of the folder being cleaned, say .cleanbk that could make clean up a quick move folder. Or even better just magically bring it back. If it worked well the warning prompt might not be as critical
The text was updated successfully, but these errors were encountered: