jenkins-bot has submitted this change and it was merged.
Change subject: Add a warning when attempting to sync a symlink. This fixes
T72054 Bug: T72054 Reviewers: bd808
......................................................................
Add a warning when attempting to sync a symlink. This fixes T72054
Bug: T72054
Reviewers: bd808
Change-Id: Ifec3a79fb041bd27599f4537aed98cf21f9cd4fe
---
M scap/main.py
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
BryanDavis: Looks good to me, approved
20after4: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scap/main.py b/scap/main.py
index 63fc0fa..9140a92 100644
--- a/scap/main.py
+++ b/scap/main.py
@@ -386,6 +386,10 @@
self.config['stage_dir'], self.arguments.file)
if not os.path.isfile(abspath):
raise IOError(errno.ENOENT, 'File not found', abspath)
+ # Warn when syncing a symlink.
+ if os.path.islink(abspath):
+ self.get_logger().warning(
+ '%s: did you mean to sync a symbolic link?', 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: merged
Gerrit-Change-Id: Ifec3a79fb041bd27599f4537aed98cf21f9cd4fe
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: 20after4 <[email protected]>
Gerrit-Reviewer: 20after4 <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits