puppeteer/tools/chmod.ts

17 lines
312 B
TypeScript
Raw Normal View History

2023-04-14 08:51:35 +00:00
/**
2024-01-03 10:11:33 +00:00
* @license
* Copyright 2023 Google Inc.
* SPDX-License-Identifier: Apache-2.0
2023-04-14 08:51:35 +00:00
*/
import fs from 'fs';
/**
* Calls chmod with the mode in argv[2] on paths in argv[3...length-1].
*/
const mode = process.argv[2];
for (let i = 3; i < process.argv.length; i++) {
fs.chmodSync(process.argv[i], mode);
}