No such file or directory

Hi, I’m trying to make an add-on for Local but I’ve getting this error:

/bin/sh: /Applications/Local: No such file or directory

I think the issue is with this line of code here:

It’s based off of this tutorial here:

Any help please? I’m new to React and my JavaScript know-how is limited, I was hoping to jump in and learn a thing or two but I’m stuck.

Hey @danieltj27

That error looks like what happens when a shell command breaks on whitespace. That line you linked to looks like this:

let command = `${context.environment.dockerPath} exec ${site.container} git status --path=/app/public --allow-root`

I haven’t tried this, but I think what you need to do is wrap the shell variable(s) in double quotes, so change that line to:

let command = `"${context.environment.dockerPath}" exec "${site.container}" git status --path=/app/public --allow-root`

In this specific case, I don’t think you need double quotes around ${site.container} but it’s a good habit to get into with Bash vars.

Let me know if that helps, or if you have any other questions!