Open
Description
Based on #30, I added this task in deno.json
{
"tasks": {
"echo": "export $(cat .env | xargs) && deno eval \"console.log(Deno.env.get('DATABASE_URL'))\""
}
}
And my .env file is below:
DATABASE_URL="Provider=MSOLEDBSQL;Data Source=localhost:1433;Initial Catalog=AdventureWorks;User ID=sa;Password=password
When running deno task echo
, the following output is produced:
% deno task echo
Task echo export $(cat .env | xargs) && deno eval "console.log(Deno.env.get('DATABASE_URL'))"
Provider=MSOLEDBSQL;Data
Note that the environment variable value is cut off after the first white space.
Metadata
Metadata
Assignees
Labels
No labels