summaryrefslogtreecommitdiffstats
path: root/remote/test/puppeteer/tools/chmod.ts
blob: da15b64fae5a8dfd074478c9e7430cc203ef4a83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
 * @license
 * Copyright 2023 Google Inc.
 * SPDX-License-Identifier: Apache-2.0
 */

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);
}