Skip to content

Conversation

@louisunlimited
Copy link
Contributor

Resolves #443

@cmcgee1024
Copy link
Member

Thanks @louisunlimited for this fix. Can you merge/rebase it against the latest changes?

@louisunlimited
Copy link
Contributor Author

@cmcgee1024 just did! lmk what else you need :))

if let mockedHomeDir = ctx.mockedHomeDir {
var env = ProcessInfo.processInfo.environment
env["GNUPGHOME"] = (mockedHomeDir / ".gnupg").string
try await sys.gpg()._import(key: tmpFile).run(environment: .init(env), quiet: true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (blocking): Since updating to swift-subprocess the environment handling is more explicit in that it can be precisely encoded that the environment should be inherited with specific overrides. This line becomes the following:

try await sys.gpg()._import(key: tmpFile).run(environment: .inherit.updating(["GNUPGHOME": (mockedHomeDir / ".gnupg").string]), quiet: true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

swiftly self-update fails with GPG verification error due to missing keys

2 participants