Skip to content

Commit 9d9250a

Browse files
committed
🚑 Going through past commits
1 parent 543bcff commit 9d9250a

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

‎.github/workflows/clean_caches.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: cleanup caches
22
on:
3-
pull_request:
4-
types:
5-
- closed
63
workflow_dispatch: # Adding manual trigger option
74

85
jobs:
@@ -31,5 +28,5 @@ jobs:
3128
done
3229
echo "Done"
3330
env:
34-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
GH_TOKEN: ${{ secrets.TOKEN }}
3532
GH_REPO: ${{ github.repository }}

‎packages/reel-creator/config.mjs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
import { VERSION } from "remotion/version";
2+
import * as fs from 'fs';
23

34
/**
45
* Use autocomplete to get a list of available regions.
56
* @type {import('@remotion/lambda').AwsRegion}
67
*/
78

8-
const readSecretFile = async (path) => {
9-
// During build time or when path is undefined, return the path itself
10-
if (!path || process.env.NODE_ENV === 'development') {
11-
return path;
12-
}
139

14-
// Only import fs when we actually need to read files
15-
// This prevents issues during build time
16-
const fs = await import('fs').then(m => m.default).catch(() => null);
17-
18-
if (!fs) {
19-
console.warn('File system module not available, returning path as is');
10+
const readSecretFile = (path) => {
11+
if (process.env.NODE_ENV === 'development') {
2012
return path;
2113
}
22-
2314
try {
2415
return fs.readFileSync(path, 'utf8').trim();
2516
} catch (error) {
2617
console.error(`Error reading secret file ${path}:`, error);
27-
return path; // Return path instead of throwing during build
18+
throw error;
2819
}
2920
};
3021

0 commit comments

Comments
 (0)