setup-cpp/packages/os-env
Amin Yahyaabadi 9d12380389
fix!: rename setup-apt functions to include the name apt
2024-08-16 02:38:15 -07:00
..
src fix!: rename setup-apt functions to include the name apt 2024-08-16 02:38:15 -07:00
.eslintrc.json chore: add linting checks via turbo 2024-08-15 17:01:33 -07:00
README.md fix!: rename setup-apt functions to include the name apt 2024-08-16 02:38:15 -07:00
package.json chore: add prepublishOnly for packages 2024-08-16 02:32:26 -07:00
tsconfig.json fix: add js file extension for all relative imports 2024-08-15 15:22:07 -07:00

README.md

os-env

Version License: Apache--2.0

Manage environment variables, PATH, and rc files

Install

npm install --save os-env

Usage

defaultRcPath (variable)

RcOptions (type)

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)

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

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.