Skip to content
Discussion options

You must be logged in to vote

If I'm not mistaken, Bob does not automatically load environment variables from the .env file (@edmundreinhardt please correct me if this is incorrect. Maybe an enhancement could be to have an option to point to a .env file). The reason it works in VSC, is because Code for IBM i loads these environment variables for you before running the build or compile command. As you found out, you can specify env vars by exporting them or by specifying them on the command itself. If you are using a shell script, you can do something like this:

myScript.sh:

#!/bin/bash

# Load environment variables from .env file
set -a
source .env
set +a

# Run compile command with the provided file argument
makei co…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by SanjulaGanepola
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants