Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/lib/policies/copyPolicyDto.ts
4772 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import * as fs from 'fs';
7
import * as path from 'path';
8
9
const sourceFile = path.join(import.meta.dirname, '../../../src/vs/workbench/contrib/policyExport/common/policyDto.ts');
10
const destFile = path.join(import.meta.dirname, 'policyDto.ts');
11
12
try {
13
// Check if source file exists
14
if (!fs.existsSync(sourceFile)) {
15
console.error(`Error: Source file not found: ${sourceFile}`);
16
console.error('Please ensure policyDto.ts exists in src/vs/workbench/contrib/policyExport/common/');
17
process.exit(1);
18
}
19
20
// Copy the file
21
fs.copyFileSync(sourceFile, destFile);
22
} catch (error) {
23
console.error(`Error copying policyDto.ts: ${(error as Error).message}`);
24
process.exit(1);
25
}
26
27