AutoBuildMarlin
AutoBuildMarlin copied to clipboard
Build success but always recieve message 'Access to path is denied'
Once the build is successful I get the following output:
I think the issue might be that there is a space in the name of my home directory so it is truncating the path to C:\Users\Scott which of course isn't a real path. Perhaps missing some quotes somewhere?
Once the build is successful I get the following output:
I think the issue might be that there is a space in the name of my home directory so it is truncating the path to C:\Users\Scott which of course isn't a real path. Perhaps missing some quotes somewhere?
Is it legal to wrap the entire path in double-quotes in your configured shell? The current logic applies single quotes to the path, but only for the bash shell:
if (process.platform == 'win32') {
t.sendText(cmdline);
var cmd = `echo "done" >${ipc_file}`;
if (vscode.env.shell.indexOf('bash') != -1)
cmd = `echo "done" >'${ipc_file}'`;
if (ping) t.sendText(cmd);
}
else
t.sendText(cmdline + (ping ? ` ; echo "done" >|${ipc_file}` : ''));
Perhaps there is a standardized method provided by node.js
for path formatting in this context. Otherwise we can just try always wrapping in double-quotes, like so:
if (process.platform == 'win32') {
t.sendText(cmdline);
var cmd = `echo "done" >"${ipc_file}"`;
if (vscode.env.shell.indexOf('bash') != -1)
cmd = `echo "done" >'${ipc_file}'`;
if (ping) t.sendText(cmd);
}
else
t.sendText(cmdline + (ping ? ` ; echo "done" >|"${ipc_file}"` : ''));
I am getting a similar error on MacOS using Fish Shell. The build completes just fine, but the echo "done"
is failing. If its a different root cause, I can open up a new bug.

I am getting a similar error on MacOS using Fish Shell.
I have some new rough logic in the works, hopefully about correct, but maybe you can verify…
const sh = vscode.env.shell,
isbash = sh.indexOf('bash') >= 0,
iszsh = sh.indexOf('zsh') >= 0,
iscmd = sh.indexOf('cmd') >= 0,
ispwsh = sh.search(/(powersh|pwsh)/i) >= 0,
iswin = process.platform == 'win32',
p = iscmd ? '&' : ';',
q = iswin && isbash ? "'" : '"',
r = (isbash || iszsh) ? '>|' : '>';
ping_cmd = `${p} echo "done" ${r}${q}${ipc_file}${q}`;
- For standard Windows command-line (CMD) the command separator is
&
– otherwise use;
. - For Windows BASH the path is wrapped in double-quotes.
- For all others the path is wrapped in single-quotes.
- For BASH or ZSH the redirect is
>|
otherwise it is just>
.
The above code will be added to 2.1.51. If the issue isn't fixed in that release, open a new one.