sapling icon indicating copy to clipboard operation
sapling copied to clipboard

`sl init` can wipe the entire directory

Open uhthomas opened this issue 1 year ago • 1 comments

I just ran sl init and it deleted all the files in the directory :|

uhthomas avatar Jul 19 '24 17:07 uhthomas

I have also run into this, specifically when running init twice. It says it aborts on the second time but it actually rm -rs which is very sad indeed.

(default) hcir@Richards-Mini / % cd ~
(default) hcir@Richards-Mini ~ % mkdir sapling test
(default) hcir@Richards-Mini ~ % echo . > test_file
(default) hcir@Richards-Mini ~ % mv test_file test/
(default) hcir@Richards-Mini ~ % cd test
(default) hcir@Richards-Mini test % ls
test_file
(default) hcir@Richards-Mini test % sl init --git
(default) hcir@Richards-Mini test % ls
test_file
(default) hcir@Richards-Mini test % sl init --git
abort: repository `/Users/hcir/test` already exists
(default) hcir@Richards-Mini test % ls
(default) hcir@Richards-Mini test %

richjames0 avatar Jul 20 '24 00:07 richjames0

This should be resolved in 16be39b8d35066473a558b63c4813eb561a2b15a.

muirdm avatar May 12 '25 13:05 muirdm