Skip to content

syntax_highlight_cli doesn't work via brew #249

Open
@maxx27

Description

@maxx27

When I installed syntax-highlight via brew, it creates symlink:

$ ls -l /opt/homebrew/bin/syntax_highlight_cli
lrwxr-xr-x@ 1 maxim  admin  74 May 22 16:01 /opt/homebrew/bin/syntax_highlight_cli ->
  /Applications/Syntax Highlight.app/Contents/Resources/syntax_highlight_cli

When I want to convert any file:

$ mkdir ~/Temp
$ cd ~/Temp
$ echo Hello > test.txt
$ syntax_highlight_cli -o test.html test.txt
Error processing /Users/m.suslov/Temp/test.txt: Syntax Highlight: colorize.sh failed with exit code 127. Command was ('/Users/Contents/Resources/highlight/colorize.sh' '/Users/m.suslov/Temp/test.txt').


command: '/Users/Contents/Resources/highlight/colorize.sh' '/Users/m.suslov/Temp/test.txt'
exitCode: 127

Here we can see that colorize.sh is invoked with incorrect path

The same if I invoke with full path to brew symlink:

/opt/homebrew/bin/syntax_highlight_cli -o test.html test.txt

But when I invoke with fullpath to application, it works:

$ '/Applications/Syntax Highlight.app/Contents/Resources/syntax_highlight_cli' -o test.html test.txt

Could please fix calling colorize.sh with right path?

P.S. Version of syntax-highlight 2.1.19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions