Skip to content

Commit 7fc4b1c

Browse files
committed
Actually ad the arg to argparse
1 parent 4725fa4 commit 7fc4b1c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎deploy/redeploy.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ def on_receive_jenkins_poke():
122122

123123
create_symlink(source=os.path.join(untar_location, "vector"), linkname=arg_symlink)
124124

125-
create_symlink(source=arg_config_location, linkname=os.path.join(untar_location, "vector", 'config.json'))
125+
if arg_config_location:
126+
create_symlink(source=arg_config_location, linkname=os.path.join(untar_location, "vector", 'config.json'))
126127

127128
return jsonify({})
128129

@@ -156,6 +157,12 @@ def on_receive_jenkins_poke():
156157
to the /vector directory INSIDE the tarball."
157158
)
158159
)
160+
parser.add_argument(
161+
"--config", dest="config", help=(
162+
"Write a symlink to config.json in the extracted tarball. \
163+
To this location."
164+
)
165+
)
159166
args = parser.parse_args()
160167
if args.jenkins.endswith("/"): # important for urljoin
161168
arg_jenkins_url = args.jenkins

0 commit comments

Comments
 (0)