Skip to content

Search many locations for unqualified dot program#21

Open
chadmiller-saq wants to merge 2 commits into
QAMichaelPeng:mainfrom
chadmiller-saq:fix-path-search
Open

Search many locations for unqualified dot program#21
chadmiller-saq wants to merge 2 commits into
QAMichaelPeng:mainfrom
chadmiller-saq:fix-path-search

Conversation

@chadmiller-saq
Copy link
Copy Markdown
Contributor

If the name of the dot executable is not qualified with a full path, we should search through some likely locations for it. Use the 'env' program with some likely paths to search through.

(A better way to know where to search would be to get the path from the user's environment, but the javascript runtime seems to scour that away.)

If we fail to complete running, tell the user what the problem probably is. From env man page,
An exit status of 127 indicates that utility could not be found.

Closes: #7
Closes: #20

@chadmiller-saq
Copy link
Copy Markdown
Contributor Author

Env '-P' is not widely supported. Awaiting a better fix.

@chadmiller-saq chadmiller-saq marked this pull request as draft November 6, 2024 13:53
If the name of the dot executable is not qualified with a full path, we
should search through some likely locations for it. Use the 'env'
program with some likely paths to search through.

(A better way to know where to search would be to get the path from the
user's environment, but the javascript runtime seems to scour that away.)

If we fail to complete running, tell the user what the problem probably is.
From env man page,
`An exit status of 127 indicates that utility could not be found.`

Closes: QAMichaelPeng#7
Closes: QAMichaelPeng#20
The "-P" parameter is a BSDism, and isn't available in GNU env.

This works because PATH is treated specially and is taken out and used
internally inside the env program, in addition to sending it to the child
program as an environment variable.
@chadmiller-saq chadmiller-saq marked this pull request as ready for review November 6, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG REPORT: Typographical error for dot script for MacOS, extra comma char instead of space in dot script Error: spawn /usr/bin/dot ENOENT

1 participant