Skip to content

Commit

Permalink
fix: root用户运行时报错
Browse files Browse the repository at this point in the history
  • Loading branch information
fishros committed Sep 20, 2023
1 parent de9a62c commit c5ca64d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/tool_install_ros_with_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,11 @@ def generte_command(self,container_name,rosname):
PrintUtils.print_success("================================5.生成命令======================================")
rosversion = RosVersions.get_ros_version(rosname).version
user = FileUtils.getusers()[0]
bashrc = '/home/{}/.bashrc'.format(user)
bin_path = "/home/{}/.fishros/bin/".format(user)
bin_path = "/root/.fishros/bin/"
bashrc = '/root/.bashrc'
if user!='root':
bin_path = "/home/{}/.fishros/bin/".format(user)
bashrc = '/home/{}/.bashrc'.format(user)
home = "/home/{}".format(user)

# create file
Expand Down

0 comments on commit c5ca64d

Please sign in to comment.