17800: Improves help message. Shows warnings when ignoring given paths.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Mon, 14 Jun 2021 17:26:21 +0000 (14:26 -0300)
committerPeter Amstutz <peter.amstutz@curii.com>
Wed, 7 Jul 2021 21:30:13 +0000 (17:30 -0400)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

sdk/python/arvados/commands/put.py

index bc07c8695a5c8d7de5310104d1d8c2325a9da231..64542b9fdffdd202c6bd516cb329414c9deff0d5 100644 (file)
@@ -173,7 +173,8 @@ Follow file and directory symlinks (default).
 """)
 _group.add_argument('--no-follow-links', action='store_false', dest='follow_links',
                     help="""
-Do not follow file and directory symlinks.
+Ignore file and directory symlinks. Even paths given explicitly on the
+command line will be skipped if they are symlinks.
 """)
 
 
@@ -525,6 +526,7 @@ class ArvPutUploadJob(object):
             elif not os.path.exists(path):
                  raise PathDoesNotExistError(u"file or directory '{}' does not exist.".format(path))
             elif (not self.follow_links) and os.path.islink(path):
+                self.logger.warning("Skipping symlink '{}'".format(path))
                 continue
             elif os.path.isdir(path):
                 # Use absolute paths on cache index so CWD doesn't interfere