Skip to content

Commit

Permalink
launch auto chmod
Browse files Browse the repository at this point in the history
  • Loading branch information
timcsy committed Nov 30, 2023
1 parent 4d1b90a commit ca0a82a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "gymize"
version = "0.0.1"
version = "0.0.2"
authors = [
{ name="timcsy", email="timocsy@yahoo.com.tw" },
]
Expand Down
14 changes: 9 additions & 5 deletions python/src/gymize/lanch.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ def launch_executable(file_name: str, args: List[str]) -> subprocess.Popen:
)
except PermissionError:
# This is likely due to missing read or execute permissions on file.
print(
'Error when trying to launch environment - make sure '
'permissions are set correctly. For example '
f'"chmod -R 755 {launch_string}"'
)
try:
os.system(f'chmod -R 755 {launch_string}')
return launch_executable(file_name, args)
except:
print(
'Error when trying to launch environment - make sure '
'permissions are set correctly. For example '
f'"chmod -R 755 {launch_string}"'
)

def launch_env(file_name: str=None, args: List[str]=list(), virtualgl=False):
if file_name is not None:
Expand Down

0 comments on commit ca0a82a

Please sign in to comment.