exec-env

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2020 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

exec-env

Execute a command using an environment form .env file. exec-env also proxies all os signals to child process.

Installation

Github Release

Visit the releases page to download one of the pre-built binaries.

Go

As secondary option you can use go install:

go install github.com/valenok-husky/exec-env

Basic Usage

exec-env -f <path to your env file> <your command with possible launch flags>

Example

Create the environment file dev.env
PORT=8080
LOG_LVL=debug
PREFIX="app prefix"
Start printenv via exec-env with our dev.env file

exec-env -f dev.env printenv

Printenv is not a part of exec-env. Printenv is a unix command. Check the man page.

The output is

<your own environment variables>
...
PORT=8080
LOG_LVL=debug
PREFIX=app prefix

It's working 🎉

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址