Skip to content

Commit

Permalink
feat: Validate config file location (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Nov 29, 2020
1 parent 96a6783 commit 9102f64
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export async function run(): Promise<void> {
`);

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

0 comments on commit 9102f64

Please sign in to comment.