Platonic-Systems / Platonic-Systems/process-compose-flake

`working_dir` doesn't work

Open
#25 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nix
Stars
205
Forks
30
PR merge metrics
No merged PRs in 30d

Description

process-compose.dev = {
  debug = true;
  tui = false;
  settings = {
    processes = {
      web = {
        command = "echo $PWD";
        working_dir = with {p = toString ./api;}; builtins.trace p p;
      };
    };
  };
};

output:

processes:
  web:
    command: echo $PWD
    working_dir: /nix/store/3cb5iy8l8hffi5cpmxx3dm2sx7gfk4a1-source/api
shell:
  shell_argument: -c
  shell_command: /nix/store/mh1c3p23xby3chc3q0c0g78fa1nn65yw-bash-5.2-p15/bin/bash
[web_1  ] /home/foxpro/craft/sferadel/next

It doesn't work even with under $HOME:

web = {
  command = "bash -c \"echo $PWD; (cd /home/foxpro/craft/sferadel/next/api; echo $PWD)\"";
  working_dir = "/home/foxpro/craft/sferadel/next/api";
};
processes:
  web:
    command: bash -c "echo $PWD; (cd /home/foxpro/craft/sferadel/next/api; echo $PWD)"
    working_dir: /home/foxpro/craft/sferadel/next/api
shell:
  shell_argument: -c
  shell_command: /nix/store/mh1c3p23xby3chc3q0c0g78fa1nn65yw-bash-5.2-p15/bin/bash
[web_1  ] /home/foxpro/craft/sferadel/next
[web_1  ] /home/foxpro/craft/sferadel/next

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

No source file or test is named. Start by tracing how the process-compose.dev configuration passes working_dir to the launched web process, using the two provided reproductions as checks. Done means the command runs in the configured directory and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Domain
devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.