diff options
author | Clark Boylan <clark.boylan@gmail.com> | 2022-09-29 08:41:56 -0700 |
---|---|---|
committer | Clark Boylan <clark.boylan@gmail.com> | 2022-09-29 08:41:56 -0700 |
commit | 4ea5c621b9052153cbd27c152867af668b1fee58 (patch) | |
tree | 754a5e8374b13874d5408b09c40d069fde90a91f /zuul/driver | |
parent | 0f5bf43e0495b149eedc63a1b331e6fa86fc9f42 (diff) | |
download | zuul-4ea5c621b9052153cbd27c152867af668b1fee58.tar.gz |
Set default SSH_AUTH_SOCK in zuul-bwrap command
The zuul-bwrap command is useful for debugging things under the zuul
bwrap environment. Unfortunately, the way things are written it assumes
there will be an SSH_AUTH_SOCK. For much debugging you might manually do
in this environment an SSH_AUTH_SOCK is unnecessary. Instead of throwing
a obtuse error simply set the value to /dev/null if not otherwise set.
Change-Id: Iec0ee93c6e6b1b647a27c9a7fdf280d14d5d2596
Diffstat (limited to 'zuul/driver')
-rw-r--r-- | zuul/driver/bubblewrap/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/zuul/driver/bubblewrap/__init__.py b/zuul/driver/bubblewrap/__init__.py index 69ade4748..935aefcae 100644 --- a/zuul/driver/bubblewrap/__init__.py +++ b/zuul/driver/bubblewrap/__init__.py @@ -239,7 +239,9 @@ def main(args=None): parser.add_argument('run_args', nargs='+') cli_args = parser.parse_args() - ssh_auth_sock = os.environ.get('SSH_AUTH_SOCK') + # The zuul-bwrap command is often run for debugging purposes. An SSH + # agent may not be necessary or present in that situation. + ssh_auth_sock = os.environ.get('SSH_AUTH_SOCK', '/dev/null') secrets = {} if cli_args.secret: |