Command "sops --set ..." works in Powershell on MacOs, but not in Powershell on Windows
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
Running this on Powershell on MacOS performs its intended purpose, i.e., to encrypt the contents of a certificate in a .yaml file:
$env:SOPS_KMS_ARN = "${module.kms_key1.alias_arn},${module.kms_key2.alias_arn}"
Set-Content -Path secrets.enc.yaml -Value "placeholder: placeholder"
sops --encrypt --in-place secrets.enc.yaml
$server_crt = Get-Content -Raw -Path data\<CERTIFICATE>.cer | jq -Rs .
sops --set "['server_crt'] $server_crt" secrets.enc.yaml
However, running the above sequence of commands in Powershell on Windows produces the following error:
Error reading file: open C:\Users\*\CERTIFICATE<FILE_CONTENT>END: The system cannot find the path specified.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the command sequence in Windows PowerShell, especially the sops --set invocation and its certificate-content argument. Trace how the CLI parses that argument and handles the resulting value versus a file path; done when the Windows command performs the same update as on macOS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, powershell
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100