-
Notifications
You must be signed in to change notification settings - Fork 51
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
Remove active workdir on prune #38
Conversation
Fix: #33 After prune any command will fail with ``` lstat $HOME/.srcd/workdirs/__active__: no such file or directory ``` and requires running init again. The issue is already tracked in #12. Signed-off-by: Maxim Sukharev <[email protected]>
After a This is correct for things like |
Signed-off-by: Maxim Sukharev <[email protected]>
Fixed. |
if err != nil { | ||
return errors.Wrap(err, "could not read workdir directory") | ||
} | ||
if len(files) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there's a .DS_Store
here?
Why not checking there's no RequiredFiles
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if there is super_import_file_dont_delete_me_or_I_will_loose_1_billion_dollars
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I understood properly (from prev conversation), that file should not be there, so it would be reasonable to delete it, wouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as .DS_Store
shouldn't be there. But it can be. Better play safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood that sourced
will ignore user changes on workdirs, not trying to keep them when pruning, but ok 👍
Fix: #33
After prune any command will fail with
and requires running init again. The issue is already tracked in #12.
Signed-off-by: Maxim Sukharev [email protected]