How to make use of "code" cli command in postAttachCommand script #94
|
I would like to open a file using However, it works as expected if I use it from the terminal. I must mention I also tried with the Do you have any way I can use to run those commands in the lifecycle hooks? |
Replies: 1 comment
|
Thank you for opening this discussion. The lifecycle commands such as the However it appears that it is not supported in vscode remote/devcontainers extension. If you are using this extension you may open a request at https://github.com/microsoft/vscode-remote-release/issues |

Thank you for opening this discussion.
The lifecycle commands such as the
onCreateCommand(the one you tried),postStartCommandandpostAttachCommandare run non-interactively, hence it won't be able to launch a UI action.If you are using Codespaces you could use
postAttachCommandthat can run interactive commands such ascode --openExternal https://www.microsoft.com.However it appears that it is not supported in vscode remote/devcontainers extension. If you are using this extension you may open a request at https://github.com/microsoft/vscode-remote-release/issues