-
Notifications
You must be signed in to change notification settings - Fork 1.3k
unable to run program with directory path #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
never-mind, I figured out the workaround here:
you use directory to have supervisor cd first, and then still use the full path in the command. this way supervisor can find the executable, and executable does not break since supervisor first cd'd into its directory. Oddly enough, despite similar syntax being used for other configuration options, the following:
is not a valid option, which would be nice to avoid having to type out the full directory path twice |
Another workaround:
|
@dvogel is there any workaround for c executable files. |
Thanks! it worked like a charm |
Thanks, but using |
This seems to be what #369 mentions, and #508 hopes to fix, but I was wondering if there is currently a workaround for this problem.
Basically while
command=/some/path/executable
works, it can break programs that try to look for files in the directory they were called from (since supervisor is technically running the executable from the root directory without cd-ing). For example I am trying to run a dedicated game server (starbound), which breaks when called in this manner since it causes it to try to find its config files in the root directory instead of the directory it is located in.I can use
But when I do I get an error that the says
can't find command "executable"
, which makes sense since (as the above linked issues discuss) supervisor is not including the directory in its path.I've been able to get around this when I'm running bash scripts like this:
Since /bin/bash is a program in the PATH, and script.sh is being passed in as an argument. But have not been able to figure out a workaround that would let me do the same for an executable.
I realize that in regular linux you run an executable with
./executable
for just this reason, since that way it looks in the current directory. However usingAlso seems to just give me the error
can't find command './executable'.
error.Long story short, is there a workaround that I can use to make the executable run when also using the directory config option to make supervisor cd into a directory first?
I'm not terribly experienced with linux, but it seems that, in the same way that /bin/bash can be used to run bash scripts, maybe you can use another program in the PATH to execute the executable? So something like:
where
/bin/RUNEXE
is a program in the PATH that then runs the executable as an argument?The text was updated successfully, but these errors were encountered: