fabiospampinato / vscode-open-in-application

Open an arbitrary file in its default app, or the app you want.
MIT License
19 stars 0 forks source link

I can't open Adobe Illustrator on my Mac. #6

Closed MasaruKitajima closed 3 years ago

MasaruKitajima commented 5 years ago

First of all, I'm really thankful for this remarkable plugin. It works almost fine.

My setting is as follows.

"openInApplication.applications": {
    "psd": "Adobe Photoshop CC 2019.app",
    "ai": "Adobe Illustrator CC 2019.app",
    "png": "Adobe Photoshop CC 2019.app",
    "key": "Keynote.app",
    "graffle": "OmniGraffle.app"
  },

Among the above, only Adobe Illustrator CC 2019.app doesn't work. Do I have any misconfiguration?

Thank you for your help.

fabiospampinato commented 5 years ago

It seems all right, I think you can also omit the .app suffix, maybe that fixes the problem for you?

MasaruKitajima commented 5 years ago

Thank you for your advice. I omitted the .app suffix, but nothing changed. And even with that suffix, other applications launch or open very well including Photoshop.

fabiospampinato commented 5 years ago

@MasaruKitajima I'm not sure why this is not working 🤔 If you have the time you could try changing open for opn, the latter is more modern and perhaps fixes the bug you encountered.

MasaruKitajima commented 5 years ago

@fabiospampinato First of all, I do apologize to be too late in replying to you. I've been sick in a hospital.

Well. I use an iMac, so went into "/Users/myname/.vscode/extensions/fabiospampinato.vscode-open-in-application-1.0.5." I've searched "commands.ts", but I couldn't find it. How can I change this file?

fabiospampinato commented 5 years ago

@MasaruKitajima Hope you're feeling better now! You'd have to edit the source of the extension, basically this repository. You should check some guide on how to develop extensions for visual studio code, but basically you have to:

  1. clone the repo
  2. run npm i
  3. make the changes you want
  4. package the extension with vsce package
  5. install the vsix in vscode
MasaruKitajima commented 5 years ago

@fabiospampinato Thank you for the instructions. I'm facing two problems.

1.npm -i failed. It says

  run `npm audit fix` to fix them, or `npm audit` for details

And here's the result of npm audit

                       === npm audit security report ===                        

┌──────────────────────────────────────────────────────────────────────────────┐
│                                Manual Review                                 │
│            Some vulnerabilities require your attention to resolve            │
│                                                                              │
│         Visit https://go.npm.me/audit-guide for additional guidance          │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Critical      │ Command Injection                                            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ open                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ open                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ open                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/663                             │
└───────────────┴──────────────────────────────────────────────────────────────┘
  1. I don't have vsce command line tools. Would you kindly let me know how to get this?

Thank you for your help!

fabiospampinato commented 5 years ago

1.npm -i failed. It says

It's npm i, not npm -i.

  1. I don't have vsce command line tools. Would you kindly let me know how to get this?

Sure, just run npm install -g vsce.

MasaruKitajima commented 5 years ago

It's npm i, not npm -i. Sure, just run npm install -g vsce.

Thank you for the advice. I could download the vsce. But I have no idea how to make the changes.

I found that http://schemas.openxmlformats.org/package/2006/content-types in [Content_Types].xml, but I couldn't reach this URI with any browsers.

fabiospampinato commented 5 years ago

@MasaruKitajima You should read the vscode documentation on how to develop an extension. If you want to debug this extension you should use Debug Launcher.

fabiospampinato commented 3 years ago

The name of the app is probably wrong in some kind of way, try using the underlying open command on mac to find the right one. Perhaps you can use an absolute path to the .app file rather than it's name.