Browse Source

fix: 使用工作目录

yaavi 1 year ago
parent
commit
20fa5d22d3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/fetch.ts

+ 1 - 1
scripts/fetch.ts

@@ -106,7 +106,7 @@ const main = async () => {
   if (result && result.length > 0) {
     console.log(result)
     const outputPath = process.env.GITHUB_OUTPUT;
-    const holidaysFile = path.join(__dirname, 'holidays.txt');
+    const holidaysFile = path.join(process.cwd(), 'holidays.txt');
     fs.writeFileSync(holidaysFile, result);
     if (outputPath) {
       fs.appendFileSync(outputPath, `holidays=${holidaysFile}\n`);