Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-17420] iOS: build.py created during iOS module project generation is not executable #5967

Merged
merged 2 commits into from
Aug 21, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions cli/lib/creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,20 @@ Creator.prototype.copyDir = function copyDir(srcDir, destDir, callback, variable
dest = dest.replace(ejsRegExp, '');
_t.logger.debug(__('Copying %s => %s', src.cyan, dest.cyan));
// strip the .ejs extension and render the template
fs.writeFile(dest, ejs.render(fs.readFileSync(src).toString(), variables), next);
fs.writeFileSync(dest, ejs.render(fs.readFileSync(src).toString(), variables));
} else {
_t.logger.debug(__('Copying %s => %s', src.cyan, dest.cyan));
fs.writeFile(dest, fs.readFileSync(src), next);
fs.writeFileSync(dest, fs.readFileSync(src));
}

fs.chmodSync(dest, fs.statSync(src).mode & 07777);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be 0777 and not 07777?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

0777 if we could ignore setuid, setgid and sticky bit. You are right, probably we won't ever need it, just trying to be future proof.

next();

} else {
// ignore
next();
}
},
callback
);
};
};