HomePhabricator

Don't leave temporary files around when trying to use credentials with…

Description

Don't leave temporary files around when trying to use credentials with destroyed secrets

Summary: Ref T4284. This fixes at least one problem which can cause the observed behavior.

Test Plan:

  • Before applying patch, used PHABRICATOR_CREDENTIAL=PHID-CDTL-... bin/ssh-connect + debugging prints to verify the keyfile was written and cleaned up normally.
  • Destroyed the credental, verified the temporary file was not cleand up correctly.
  • Applied patch, verified temporary file was not written and command exited with sensible error.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4284

Differential Revision: https://secure.phabricator.com/D10328