20after4 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/180200
Change subject: Add a warning when attempting to sync a symlink. This fixes
T68302
......................................................................
Add a warning when attempting to sync a symlink. This fixes T68302
Bug: T68302
Reviewers: bd808
Change-Id: Ifec3a79fb041bd27599f4537aed98cf21f9cd4fe
---
M scap/main.py
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap
refs/changes/00/180200/1
diff --git a/scap/main.py b/scap/main.py
index 63fc0fa..b086ffc 100644
--- a/scap/main.py
+++ b/scap/main.py
@@ -386,6 +386,11 @@
self.config['stage_dir'], self.arguments.file)
if not os.path.isfile(abspath):
raise IOError(errno.ENOENT, 'File not found', abspath)
+ """Warn before syncing a symlink. Scap will sync the symlink,
+ not the file it points to"""
+ if os.path.islink(abspath)
+ self.get_logger().warning(
+ '%s: did you mean to sync a symbolic link? scap does not
dereference symlinks.', abspath)
self.include = os.path.relpath(abspath, self.config['stage_dir'])
subprocess.check_call('/usr/bin/php -l %s' % abspath, shell=True)
--
To view, visit https://gerrit.wikimedia.org/r/180200
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifec3a79fb041bd27599f4537aed98cf21f9cd4fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: 20after4 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits