Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Env Interpolation in Scripts #115

Open
bjesuiter opened this issue Jun 27, 2022 · 1 comment
Open

Problem: Env Interpolation in Scripts #115

bjesuiter opened this issue Jun 27, 2022 · 1 comment

Comments

@bjesuiter
Copy link

I use the following script definitions (simplified for shortness):

envFile:
  - .env
  
scripts:
  install: 
    cmd: deno install --name ${CLI_NAME} main.ts 
    allow: 
      read: true
      run: true
      net: 'deno.land,x.nest.land'

Problem

CLI_NAME is empty on windows in this setting

Wanted Behavior

CLI_NAME contains the right content as loaded from .env and is correctly interpolated for running the command

@umbopepato
Copy link
Member

umbopepato commented Jun 28, 2022

Hey @bjesuiter, please consider that the command string is executed into a different shell depending on the OS and vr configuration (see Shell scripting) and variable substitution is managed by that shell, not by vr.

In your case, unless you changed the VR_SHELL env variable, the command should be executed in PowerShell, where it looks like the ${} syntax is not used for variable substitution (my Windows/PowerShell knowledge is pretty limited so please double check). Does $CLI_NAME work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants