tobiastimm / code-theme-converter

Convert any Visual Studio Code Theme to Sublime Text 3 or IntelliJ IDEA
MIT License
141 stars 11 forks source link

No such file or directory '/tmp/code-theme-converter/repo/themes' #35

Closed uhthomas closed 3 years ago

uhthomas commented 3 years ago
$ yarn global add code-theme-converter
$ code2subl https://github.com/cue-sh/vscode-cue.git
Fetching repo
Error: ENOENT: no such file or directory, scandir '/tmp/code-theme-converter/repo/themes'
🎉 Successfully converted the vscode theme for sublime text!
uhthomas commented 3 years ago

Creating the directory doesn't help

➜  ~ mkdir -p /tmp/code-theme-converter/repo/themes
➜  ~ ls /tmp/code-theme-converter/repo/themes
➜  ~ code2subl https://github.com/cue-sh/vscode-cue.git
Fetching repo
Error: ENOENT: no such file or directory, scandir '/tmp/code-theme-converter/repo/themes'
🎉 Successfully converted the vscode theme for sublime text!
➜  ~ ls /tmp/code-theme-converter/repo/themes
ls: cannot access '/tmp/code-theme-converter/repo/themes': No such file or directory
uhthomas commented 3 years ago

I suspect this error message is misleading. Using the example repository works okay.

➜  ~ code2subl https://github.com/tobiastimm/raiju.git
Fetching repo
Converting 5 themes
🎉 Successfully converted the vscode theme for sublime text!
Converting Raijū - Dark (No italics)
Converting Raijū (No italics)
Converting Raijū - Dark
Converting Raijū
Converting Raijū - Classic
➜  ~ code2subl https://github.com/cue-sh/vscode-cue.git
Fetching repo
Error: ENOENT: no such file or directory, scandir '/tmp/code-theme-converter/repo/themes'
🎉 Successfully converted the vscode theme for sublime text!
uhthomas commented 3 years ago

I understand this project isn't what I'm looking for unfortunately, but will leave this open for future users as it would be nice to have better error messages 😄

tobiastimm commented 3 years ago

@uhthomas the repo you want to convert doesn't include any themes to convert, that's why you get that error message. It is not misleading in this case, because the repository doesn't have a themes directory

uhthomas commented 3 years ago

I see, I think the 🎉 Successfully converted the vscode theme for sublime text! is definitely wrong though, as it was not successful.

tobiastimm commented 3 years ago

yh thats an issue 😄