Skip to content

Commit

Permalink
fix bug in windows: .bat should be added when uclid path is created t…
Browse files Browse the repository at this point in the history
…o avoid issue with early return
  • Loading branch information
FedericoAureliano committed Feb 11, 2024
1 parent e0172d2 commit a862e1f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/uclid/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def download_uclid():
# Get the other directories we'll use
build = os.path.join(base, "build")
uclid = os.path.join(build, "uclid-0.9.5", "bin", "uclid")
# if on windows, add .bat to uclid
if os.name == "nt":
uclid += ".bat"
_logger.info(f"Uclid executable: {uclid}")

# if uclid exists, return it
if os.path.exists(uclid):
Expand Down Expand Up @@ -62,12 +66,6 @@ def download_uclid():
zip_ref.extractall(build)
_logger.info("Uclid unzipped")

# if on windows, add .bat to uclid
if os.name == "nt":
uclid += ".bat"

_logger.info(f"Uclid executable: {uclid}")

# make uclid executable
_logger.info("Making Uclid executable")
os.chmod(uclid, 0o755)
Expand Down

0 comments on commit a862e1f

Please sign in to comment.