Skip to content
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

Change specification when relative paths are specified in the runtime attribute #307

Open
Tracked by #214
zero-plusplus opened this issue Dec 2, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@zero-plusplus
Copy link
Owner

RELATED: #303

The current runtime attribute is treated as relative to the AutoHotkey directory if the path specified is not absolute.

For example, if autohotkey is specified, it will be converted to C:/Program Files/AutoHotkey/AutoHotkey.exe.

However, I noticed that if you specify autohotkey, it expects to find autohotkey in directories registered in the environment variable.

For example, if the AutoHotkey runtime is located in C:/foo/AutoHotkey.exe and C:/foo is registered in the environment variable, it means that autohotkey will expect to be converted to C:/foo/AutoHotkey.exe.

However, as the default value of runtime is AutoHotkey.exe, users may refer to it and set the value directly in launch.json. This will be treated as an error after the specification change, so users will be confused.

So I will search the directory registered in the environment variable if it does not contain path delimiters such as / or `, and if the runtime does not exist, refer to the default installation directory of AutoHotkey as before.

If you want to treat the path as relative to the installation directory, use . /autohotkey, for example . / to start with.

This is not a destructive change, so it is probably more of an improvement than a specification change.

Additionally, this change to the specification may solve this issue.

@zero-plusplus zero-plusplus added the enhancement New feature or request label Dec 2, 2023
@zero-plusplus zero-plusplus mentioned this issue Dec 2, 2023
62 tasks
zero-plusplus added a commit that referenced this issue Dec 3, 2023
zero-plusplus added a commit that referenced this issue Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant