Skip to content

Commit

Permalink
Add Chmod +x
Browse files Browse the repository at this point in the history
  • Loading branch information
techguy16 authored Jul 25, 2023
1 parent 8528fa4 commit e6ed72e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions umsktpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ def find_umskt_executable():
raise OSError("Unsupported operating system. The 'umskt' executable is not available for this platform.")

umskt_path = os.path.join(current_dir, umskt_name)
if os_name == "Linux":
command = ["chmod", "+x", umskt_path]
result = run(command, stdout=PIPE, stderr=PIPE, universal_newlines=True)
if os_name == "FreeBSD":
command = ["chmod", "+x", umskt_path]
result = run(command, stdout=PIPE, stderr=PIPE, universal_newlines=True)
if os_name == "Darwin":
command = ["chmod", "+x", umskt_path]
result = run(command, stdout=PIPE, stderr=PIPE, universal_newlines=True)

if not os.path.exists(umskt_path):
raise FileNotFoundError(f"The '{umskt_name}' executable was not found in the library directory for your operating system.")
Expand Down

0 comments on commit e6ed72e

Please sign in to comment.