Przeglądaj źródła

feat: remove old scripts folder on start

Nicolas Meienberger 1 rok temu
rodzic
commit
b159c151ae

+ 1 - 0
.github/workflows/release.yml

@@ -54,6 +54,7 @@ jobs:
 
 
   build-cli:
   build-cli:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
+    timeout-minutes: 10
     needs: get-tag
     needs: get-tag
     steps:
     steps:
       - name: Checkout code
       - name: Checkout code

+ 6 - 0
packages/cli/src/executors/system/system.helpers.ts

@@ -217,6 +217,12 @@ export const setEnvVariable = async (key: EnvKeys, value: string) => {
  * Copies the system files from the assets folder to the current working directory
  * Copies the system files from the assets folder to the current working directory
  */
  */
 export const copySystemFiles = async () => {
 export const copySystemFiles = async () => {
+  // Remove old unused files
+  if (await pathExists(path.join(process.cwd(), 'scripts'))) {
+    fileLogger.info('Removing old scripts folder');
+    await fs.promises.rmdir(path.join(process.cwd(), 'scripts'), { recursive: true });
+  }
+
   const assetsFolder = path.join('/snapshot', 'runtipi', 'packages', 'cli', 'assets');
   const assetsFolder = path.join('/snapshot', 'runtipi', 'packages', 'cli', 'assets');
 
 
   // Copy docker-compose.yml file
   // Copy docker-compose.yml file