Shopify / Shopify/shadowenv

Proposal: `shadowenv -C $dir`

Open
#47 1 comment 1 reaction 1 assignee View on GitHub

@GustavoCaso is already working on this.

Since Aug 2, 2019.

Dominant language
Rust
Stars
458
Forks
22
PR merge metrics
No merged PRs in 30d

Description

I propose adding -C|--change-dir to Shadowenv, which would change to the indicated directory before executing the command. Behaviour per command:

  • shadowenv help: no obvious change
  • shadowenv init: no obvious change
  • shadowenv hook: evaluate the shadowlisp from the indicated directory rather than the current one.
  • shadowenv trust: trust the ./.shadowenv.d from the indicated directory rather than the current one.
  • shadowenv exec: Change to the indicated directory before loading the environment and executing the indicated process.
  • shadowenv diff: unclear. Probably none? Conceivably we could apply the environment changes indicated by the directory's shadowlisp first.
Example usage:
shadowenv -C /my/project exec irb

I don't actually have any need motivating this, but I think it'd be a nice, obvious, and relatively simple feature.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.