diff options
author | Mateus Azis <azis@google.com> | 2022-07-21 08:13:09 -0700 |
---|---|---|
committer | Mateus Azis <azis@google.com> | 2022-07-25 15:22:14 +0000 |
commit | bddc964d9340c66066590a81d21934362fb0c490 (patch) | |
tree | 09d32b3e13c09c047b228f53db9dd7f35c19a10a /subcmds/init.py | |
parent | a8cf575d68e7e211292d967f4a12cf609a028b20 (diff) | |
download | git-repo-bddc964d9340c66066590a81d21934362fb0c490.tar.gz |
Fix the printed path of the ".repo" dir after a fresh init.
Apparently, manifest.topdir already contains a trailing slash in some
cases, so a simple string concatenation may or not lead to double
slashes. It is safer to use os.path.join. See
https://screenshot.googleplex.com/6pSY3QewAeCdAqk
Change-Id: I2411452296b7e78fc975787b675273a48d6b3d85
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/341574
Reviewed-by: LaMont Jones <lamontjones@google.com>
Tested-by: Mateus Azis <azis@google.com>
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index cced44d5..e4df6b37 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -241,7 +241,7 @@ to update the working directory files. | |||
241 | if current_dir != self.manifest.topdir: | 241 | if current_dir != self.manifest.topdir: |
242 | print('If this is not the directory in which you want to initialize ' | 242 | print('If this is not the directory in which you want to initialize ' |
243 | 'repo, please run:') | 243 | 'repo, please run:') |
244 | print(' rm -r %s/.repo' % self.manifest.topdir) | 244 | print(' rm -r %s' % os.path.join(self.manifest.topdir, '.repo')) |
245 | print('and try again.') | 245 | print('and try again.') |
246 | 246 | ||
247 | def ValidateOptions(self, opt, args): | 247 | def ValidateOptions(self, opt, args): |