RichiH / vcsh

config manager based on Git

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flip flop bug in write-gitignore

alerque opened this issue · comments

Just bumped into a bug I haven't seen before with vcsh write-gitignore, specifically the relatively new variant run from inside an active VCSH shell and without a repo argument (haven't tested other arrangements).

Running it once properly updates the file properly.

Running it a second time bombs with an error about temp files. The resulting state is that the ignore file is deleted. Running it again will recreate the file properly, and so on.

$ echo $VCSH_GITIGNORE
exact
$ vcsh write-gitignore
$ vcsh write-gitignore
vcsh: info: '/home/caleb/.gitignore.d/que-utils' differs from new data, moving it to '/home/caleb/.gitignore.d/que-utils.bak'
mv: cannot stat '/tmp/caleb/tmp.PL3GpPNS1w': No such file or directory
vcsh: fatal: could not move '/tmp/caleb/tmp.PL3GpPNS1w' to '/home/caleb/.gitignore.d/que-utils'
$ stat ~/.gitignore.d/que-utils
stat: cannot statx '/home/caleb/.gitignore.d/que-utils': No such file or directory
$ vcsh write-gitignore
$ vcsh version
vcsh 2.0.0-beta.1-arch.2
git version 2.32.0