Skip to content

Commit 6a8641b

Browse files
committed
Fixed copying of firmware utils in cases where directory is "."
1 parent 66bc519 commit 6a8641b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/flashing/silabs_firmware_utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,13 @@ def _platform_wrapper_args(self, args):
180180
flashbundle_contents = os.path.basename(args.output)
181181
if args.application is not None:
182182
flashbundle_contents += "\n" + os.path.basename(args.application)
183+
output_dir = os.path.dirname(args.output) or "."
183184
if args.platform_firmware_utils is not None:
184185
flashbundle_contents += "\n" + os.path.basename(args.platform_firmware_utils)
185-
subprocess.run(["cp", args.platform_firmware_utils, os.path.dirname(args.output)])
186+
subprocess.run(["cp", args.platform_firmware_utils, output_dir])
186187
if args.firmware_utils is not None:
187188
flashbundle_contents += "\n" + os.path.basename(args.firmware_utils)
188-
subprocess.run(["cp", args.firmware_utils, os.path.dirname(args.output)])
189+
subprocess.run(["cp", args.firmware_utils, output_dir])
189190

190191
# Create the flashbundle file.
191192
try:

0 commit comments

Comments
 (0)