How to use the @actions/io.rmRF function in @actions/io

To help you get started, we’ve selected a few @actions/io examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / k8s-actions / docker-logout / src / logout.ts View on Github external
function run() {
    core.warning('This action is moved to azure/containers-actions repository, update your workflows to use those actions instead.');
    let pathToDockerConfig = process.env['DOCKER_CONFIG'];
    if (pathToDockerConfig && ioUtil.exists(pathToDockerConfig)) {
        io.rmRF(pathToDockerConfig); // Deleting the docker config directory
        core.debug(`${pathToDockerConfig} has been successfully deleted`);
    };
    issueCommand('set-env', { name: 'DOCKER_CONFIG' }, '');
    console.log('DOCKER_CONFIG environment variable unset');
}
github Azure / webapps-deploy / node_modules / azure-actions-utility / ziputility.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
        var defer = Q.defer();
        if (packageUtility_1.exist(unzipLocation)) {
            yield io.rmRF(unzipLocation);
        }
        var unzipper = new DecompressZip(zipLocation);
        console.log('extracting ' + zipLocation + ' to ' + unzipLocation);
        unzipper.on('error', function (error) {
            defer.reject(error);
        });
        unzipper.on('extract', function (log) {
            console.log('extracted ' + zipLocation + ' to ' + unzipLocation + ' Successfully');
            defer.resolve(unzipLocation);
        });
        unzipper.extract({
            path: unzipLocation
        });
        return defer.promise;
    });
}
github expo / expo-github-action / node_modules / @actions / tool-cache / lib / tool-cache.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
        const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || '');
        core.debug(`destination ${folderPath}`);
        const markerPath = `${folderPath}.complete`;
        yield io.rmRF(folderPath);
        yield io.rmRF(markerPath);
        yield io.mkdirP(folderPath);
        return folderPath;
    });
}
github actions / setup-ruby / node_modules / @actions / tool-cache / lib / tool-cache.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
        const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || '');
        core.debug(`destination ${folderPath}`);
        const markerPath = `${folderPath}.complete`;
        yield io.rmRF(folderPath);
        yield io.rmRF(markerPath);
        yield io.mkdirP(folderPath);
        return folderPath;
    });
}
github subosito / flutter-action / node_modules / @actions / tool-cache / lib / tool-cache.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
        const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || '');
        core.debug(`destination ${folderPath}`);
        const markerPath = `${folderPath}.complete`;
        yield io.rmRF(folderPath);
        yield io.rmRF(markerPath);
        yield io.mkdirP(folderPath);
        return folderPath;
    });
}
github actions / toolkit / packages / tool-cache / src / tool-cache.ts View on Github external
async function _createToolPath(
  tool: string,
  version: string,
  arch?: string
): Promise {
  const folderPath = path.join(
    cacheRoot,
    tool,
    semver.clean(version) || version,
    arch || ''
  )
  core.debug(`destination ${folderPath}`)
  const markerPath = `${folderPath}.complete`
  await io.rmRF(folderPath)
  await io.rmRF(markerPath)
  await io.mkdirP(folderPath)
  return folderPath
}
github actions / toolkit / packages / tool-cache / src / tool-cache.ts View on Github external
async function _createToolPath(
  tool: string,
  version: string,
  arch?: string
): Promise {
  const folderPath = path.join(
    cacheRoot,
    tool,
    semver.clean(version) || version,
    arch || ''
  )
  core.debug(`destination ${folderPath}`)
  const markerPath = `${folderPath}.complete`
  await io.rmRF(folderPath)
  await io.rmRF(markerPath)
  await io.mkdirP(folderPath)
  return folderPath
}
github actions / setup-node / node_modules / @actions / tool-cache / lib / tool-cache.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
        const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || '');
        core.debug(`destination ${folderPath}`);
        const markerPath = `${folderPath}.complete`;
        yield io.rmRF(folderPath);
        yield io.rmRF(markerPath);
        yield io.mkdirP(folderPath);
        return folderPath;
    });
}
github subosito / flutter-action / node_modules / @actions / tool-cache / lib / tool-cache.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
        const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || '');
        core.debug(`destination ${folderPath}`);
        const markerPath = `${folderPath}.complete`;
        yield io.rmRF(folderPath);
        yield io.rmRF(markerPath);
        yield io.mkdirP(folderPath);
        return folderPath;
    });
}