question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide utility environment variables to `meta-exec`

See original GitHub issue

🚀 Feature Proposal

Have things like current folder name (just the name, not the full path) as an environment variable you can use in commands

Motivation

Take this for example. I have three repos (two python repos & one node) image

And I run the following command:

$ meta exec "[ -f requirements.txt ] && echo dir:`pwd`" --include-only=python-project-1,python-project-2,node-project-2

image

The context or current working directory is still where I ran the command from. It would be good to have access to such things when running meta-exec. But I don’t know if this should be in loop or meta-exec. An environment variable like META_CWD. See example below.

Example

Say I want to create virtual environments for all my python projects with just the folder name as the venv name.

$ meta exec "[ -f requirements.txt ] && python3 -m venv --prompt $META_CWD   .venv"

Currently there is no easy way to do this so I just manually create my virtual environments. Hope I am making sense.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
patrickleetcommented, Mar 29, 2021
0reactions
vviikkcommented, Mar 29, 2021

Legend, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

govc Utility Environment Variables - Commvault Documentation
The govc utility uses required and optional environment variables to communicate with the vCenter host. Required govc environment variables.
Read more >
Checking environment variables with the chkenv utility - IBM
The chkenv utility checks the validity of shared or private environment-configuration files. It validates the names of the environment variables in the file ......
Read more >
Environment Variables - The Open Group Publications Catalog
Environment variables that apply to a single utility only are defined as part of the utility description. See the ENVIRONMENT VARIABLES section of...
Read more >
Use environment variables from an Elastic Beanstalk instance ...
I want to use environment variables from an AWS Elastic Beanstalk ... To use a utility with environment variables from the operating system ......
Read more >
Cloud Foundry Environment Variables
The cf env command displays the following environment variables: The VCAP_APPLICATION and VCAP_SERVICES variables provided in the container ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found