fix for providing an icon path in POSIX format #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
stumbled on an issue with supplying a local path to an icon file, where this error occurs:
ultimately, the error occurs because applescript seems to expect files to be referenced by colon-delimited paths, otherwise known as a Hierarchical File System (HFS) path. you can tell applescript the path is POSIX format by adding the directive
POSIX path
before the file path is provided.sorry for the very noisy diff - gofmt insisted on changing all the spaces to tabs. the specific change I am hoping to contribute here is found on line 84 here. if you'd like I can restore the original files and make the necessary changes with formatOnSave disabled as described here, because apparently there is currently no way to modify gofmt's behavior when used with the VS code extension.
the corresponding test is also updated, with similar space -> tab conversions by gofmt unfortunately.
I'm also wondering if this should be implemented in a more conditional manner, maybe with some special handling depending on if the dialog.Icon path is detected as POSIX or HFS format? I could add that logic as well if it would be helpful. the reason I did not implement that logic already is because I find it doubtful that most people will specify paths in HFS format, but I could definitely be wrong.
thanks for reviewing this!