From 5ade88be5ea5dcc4564ba15045e3732105021c38 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Mon, 2 Sep 2024 10:51:25 -0500 Subject: [PATCH] Use find's exec to handle paths with spaces --- vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index f7e7419..3620447 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,7 +4,7 @@ export default () => { // https://stackoverflow.com/a/71162041/3814663 const commitDate = childProcess.execSync('git log -1 --format=%cI').toString().trimEnd(); const commitHash = childProcess.execSync('git rev-parse HEAD').toString().trimEnd(); - const fileDates = childProcess.execSync(`find . -iname '*.geojson' -not -path './dist/*' | xargs ls -lh`).toString().trimEnd(); + const fileDates = childProcess.execSync(`find . -iname '*.geojson' -not -path './dist/*' -exec ls -lh {} +`).toString().trimEnd(); process.env.VITE_GIT_COMMIT_DATE = commitDate; process.env.VITE_GIT_COMMIT_HASH = commitHash; process.env.VITE_FILE_DATES = fileDates;