readIntoSocket: fix with store URIs containing an & #4

Merged
delroth merged 1 commit from ma27/hydra:lix/fix-readIntoSocket into main 2024-08-18 21:41:58 +00:00
Member

The third argument to open() in -| mode is passed to a shell if it's
a string. In my case the store URI contains
?secret-key=${signingKey.directory}/secret&compression=zstd

For the nix store cat case this means that

  • until & the process will be started in the background. This fails
    immediately because no path to cat is specified.
  • compression=zstd is a variable assignment
  • the $path argument to store cat is attempted to be executed as
    another command

Passing just the list solves the problem.

cc @delroth

The third argument to `open()` in `-|` mode is passed to a shell if it's a string. In my case the store URI contains `?secret-key=${signingKey.directory}/secret&compression=zstd` For the `nix store cat` case this means that * until `&` the process will be started in the background. This fails immediately because no path to cat is specified. * `compression=zstd` is a variable assignment * the `$path` argument to `store cat` is attempted to be executed as another command Passing just the list solves the problem. cc @delroth
ma27 added 1 commit 2024-08-18 11:35:32 +00:00
The third argument to `open()` in `-|` mode is passed to a shell if it's
a string. In my case the store URI contains
`?secret-key=${signingKey.directory}/secret&compression=zstd`

For the `nix store cat` case this means that

* until `&` the process will be started in the background. This fails
  immediately because no path to cat is specified.
* `compression=zstd` is a variable assignment
* the `$path` argument to `store cat` is attempted to be executed as
  another command

Passing just the list solves the problem.
delroth merged commit 3ee51dbe58 into main 2024-08-18 21:41:58 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/hydra#4
No description provided.