Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): Don't override config by setting cli options to undefined #2330

Merged

Commits on Nov 15, 2022

  1. fix(cli): Don't override config by setting cli options to undefined

    This has been introduced by vitest-dev#2180. The change there will *always* set
    argv.dir, no matter if it's been there before or not. When it's not
    there, it will set it to undefined, which then will lead to vitest using
    the root as fallback instead of the config set in the config file, since
    CLI options override config options.
    
    In our case, this config was essentially ignored since 0.24.4.
    
    ```js
    import { defineConfig } from "vite"
    
    export default defineConfig({
      test: {
        dir: "spec/javascript"
      }
    })
    ```
    
    with the only workaround of providing `dir` via CLI option.
    rmehner committed Nov 15, 2022
    Copy the full SHA
    ddd91c2 View commit details
    Browse the repository at this point in the history