Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

fix chmod bug #2689

Merged
merged 2 commits into from
Jul 16, 2020
Merged

fix chmod bug #2689

merged 2 commits into from
Jul 16, 2020

Conversation

JunweiSUN
Copy link
Contributor

The original allowPermission can not handle strings with wildcard, remove single quotes from the original function.

@JunweiSUN JunweiSUN requested a review from liuzhe-lz July 15, 2020 07:58
let command;

if (isRecursive) {
command = `chmod 777 -R '${folderString}'`;
command = `chmod 777 -R ${folderString}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the ''?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because shell can not expand wildcard in single quotes. For example, this line can not be executed correctly:

chmod 777 '/tmp/nni/*'

This pr will change the command to

chmod 777 /tmp/nni/*

@liuzhe-lz
Copy link
Contributor

The ideal solution should be setting shared permission on creation. Though we might need to keep chmod for at least one release to fix old files on our customer's computers.
But if we are releasing a hotfix version in recent days I accept this patch.

@chicm-ms chicm-ms merged commit 8fb8f8b into microsoft:master Jul 16, 2020
@JunweiSUN JunweiSUN deleted the dev-fix-junwei branch July 17, 2020 07:25
@scarlett2018 scarlett2018 mentioned this pull request Jul 22, 2020
66 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants