Runar Ovesen Hjerpbakk

Programmer. Software Architect. Technical Manager.

How to edit the Open Folder in Visual Studio Code macOS service

Got a question from andrewb273 on GitHub regarding my macOS service which opens a folder in Visual Studio Code:

Can you add the source code for this extension and instructions on building it?


Source Code

The source was always on GitHub, but since this is a macOS Automator workflow, the code is not immediately obvious. The easiest way to work with this code is to either clone or download the repository, then open the workflow in Automator on macOS.

Open in Automator

By default, .workflow files are handled by the Automator Installer, which installs the workflow into macOS. To open the workflow for edit, right-click the file, choose Open With > and then:

Edit in Automator

The code itself is a Bash-script and can be easily viewed and changed in Automator:

The code is a simple Bash script


Since this is a bash script within an Automator workflow, no building is necessary. The script itself can be run and tested using the Terminal, or from within Automator using the Run command.