Skip to content

Commit 9102f64

Browse files
authored
feat: Validate config file location (#335)
1 parent 96a6783 commit 9102f64

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ export async function run(): Promise<void> {
6363
`);
6464

6565
const configFilePath = inps.ConfigFilePath;
66+
// Validate config file location
67+
if (!fs.existsSync(configFilePath)) {
68+
throw new Error(`not found ${configFilePath}`);
69+
}
6670
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6771
const config: any = yaml.safeLoad(fs.readFileSync(configFilePath, 'utf8'));
6872
if (core.isDebug()) {

0 commit comments

Comments
 (0)