casey / casey/just

The `[no-cd]` attribute doesn't respect the `working-directory` of dependents

Open
#2,940 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
35.8k
Forks
846
Avg merge
27m
Merged PRs (30d)
3

Description

Hello there! Thanks a lot for creating this project 😄

It would be incredibly helpful to allow recipes with an explicit `working-directory` to maintain that location for the duration of its lifecycle. I thought adding `[no-cd]` to dependencies would work like that but it does not. Here's an example:

```just
[working-directory: "docs"]
@foo: dependency && dependency
python -c "import os;print('caller in:', os.getcwd())"

[no-cd]
@dependency:
python -c "import os;print('dependency in:', os.getcwd())"
```

```
❯ just foo
dependency in: C:\Users\ofek\Desktop\code\msgspec
caller in: C:\Users\ofek\Desktop\code\msgspec\docs
dependency in: C:\Users\ofek\Desktop\code\msgspec
```

Would this require new functionality or is the current behavior unintentional?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.