vscode-ansible-vault
vscode-ansible-vault copied to clipboard
Windows: decoding fail when entering password
I use VSCode on Windows. When trying to use this extension without storing password on filesystem (e.g. entering password each time it's required), I face the following error:
Command failed: touch C:\Users\User\AppData\Local\Temp\tmp-57692Jab9WhG31WYX && echo "PassWord" > C:\Users\User\AppData\Local\Temp\tmp-57692Jab9WhG31WYX 'touch' is not recognized as an internal or external command, operable program or batch file.
It's an expected behavior, because Windows doesn't have Unix commands natively.
My offer is to use TypeScript/JS native ways to write files (e.g. fs
module) - this will resolve all possible cross-platform problems.
Also after looking at the code, I see that there's some kind of "path magic" like:
let keyfile = config.keyfile.trim("/");
keyfile = keyfile.trim("/");
It's not cross-platform, on Windows path separator is \
, not /
. It should be OK to remove this code and print an error when someone puts incorrect path there.
I'm having the same issue here. It would be nice to be able to use this on Windows.