MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / allowExecution

Function allowExecution

Extension/src/common.ts:864–877  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

862}
863
864export async function allowExecution(file: string): Promise<void> {
865 if (process.platform !== 'win32') {
866 const exists: boolean = await checkFileExists(file);
867 if (exists) {
868 const isExec: boolean = await isExecutable(file);
869 if (!isExec) {
870 await chmodAsync(file, '755');
871 }
872 } else {
873 getOutputChannelLogger().appendLine("");
874 getOutputChannelLogger().appendLine(localize("warning.file.missing", "Warning: Expected file {0} is missing.", file));
875 }
876 }
877}
878
879export async function chmodAsync(path: fs.PathLike, mode: fs.Mode): Promise<void> {
880 return new Promise<void>((resolve, reject) => {

Callers

nothing calls this directly

Calls 5

getOutputChannelLoggerFunction · 0.90
checkFileExistsFunction · 0.85
isExecutableFunction · 0.85
chmodAsyncFunction · 0.85
appendLineMethod · 0.80

Tested by

no test coverage detected