Template
1
0
mirror of https://github.com/aminya/setup-cpp synced 2024-11-30 21:22:30 +08:00
setup-cpp/packages/envosman
2024-10-06 20:48:03 -07:00
..
src fix: fix ci-info not running in an ESM context 2024-10-06 20:48:03 -07:00
.eslintrc.json fix!: rename os-env to envosman due to npm conflict 2024-08-16 02:56:38 -07:00
package.json fix: fix ci-info not running in an ESM context 2024-10-06 20:48:03 -07:00
README.md feat: introduce setup-brew package 2024-08-23 15:20:37 -07:00
tsconfig.json fix!: rename os-env to envosman due to npm conflict 2024-08-16 02:56:38 -07:00

envosman

Version License: Apache--2.0

Manage environment variables, PATH, and rc files

Install

npm install --save envosman

Usage

defaultRcPath (variable)

RcOptions (type)

Options for adding an rc file

sourceRCInRc (variable)

handles adding conditions to source rc file from .bashrc and .profile

finalizeRC (function)

Parameters:

  • rcOptions (RcOptions)

returns: Promise

escapeString (function)

Escape a string for use in a shell command

Parameters:

  • valGiven (string) - The string to escape
  • shouldEscapeSpace (boolean) - Whether to escape spaces in the string

returns: any

AddEnvOptions (type)

The options for adding an environment variable

addEnv (function)

Add an environment variable.

This function is cross-platforms and works in all the local or CI systems.

Parameters:

  • name (string)
  • valGiven (string)
  • givenOptions (Partial<AddEnvOptions>)

returns: Promise

AddPathOptions (type)

The options for adding a PATH variable

addPath (function)

Add a path to the PATH environment variable.

This function is cross-platforms and works in all the local or CI systems.

Parameters:

  • path (string)
  • givenOptions (Partial<AddPathOptions>)

returns: Promise

🤝 Contributing

You can sponsor my work here:

https://github.com/sponsors/aminya

Pull requests, issues and feature requests are welcome. See the Contributing guide.