From 7a37c715463ff2cad23c0e8e135f9a78ecd24aa8 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilev Date: Sun, 2 Jul 2023 22:15:10 +0300 Subject: [PATCH] fix create file --- src/cmd.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cmd.js b/src/cmd.js index fa71584..bafde88 100644 --- a/src/cmd.js +++ b/src/cmd.js @@ -844,10 +844,12 @@ const apply_entrypoint_settings = (state, entrypoint_settings) => { const load_dir = (state, dir, entrypoint_settings) => { // Clear parse cache and rerun code + const with_dir = do_load_dir(state, dir) return run_code({ - ...apply_entrypoint_settings( - do_load_dir(state, dir), - entrypoint_settings, + ...( + entrypoint_settings == null + ? with_dir + : apply_entrypoint_settings(with_dir, entrypoint_settings) ), // remove cache. We have to clear cache because imports of modules that are // not available because project_dir is not available have errors and the