diff --git a/src/index.ts b/src/index.ts index 75d8965..80a1ccd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -218,7 +218,7 @@ function resolveLaravelPlugin(pluginConfig: Required): LaravelPlug server.config.logger.info(` ${colors.green('➜')} Using Herd certificate to secure Vite.`) } - if (resolvedConfig.server.https.key.startsWith(valetConfigPath())) { + if (resolvedConfig.server.https.key.startsWith(valetMacConfigPath()) || resolvedConfig.server.https.key.startsWith(valetLinuxConfigPath())) { server.config.logger.info(` ${colors.green('➜')} Using Valet certificate to secure Vite.`) } } @@ -580,8 +580,12 @@ function determineDevelopmentEnvironmentConfigPath(): string|undefined { return herdWindowsConfigPath() } - if (fs.existsSync(valetConfigPath())) { - return valetConfigPath() + if (fs.existsSync(valetMacConfigPath())) { + return valetMacConfigPath() + } + + if (fs.existsSync(valetLinuxConfigPath())) { + return valetLinuxConfigPath() } } @@ -622,8 +626,15 @@ function herdWindowsConfigPath(): string { } /** - * Valet's configuration directory. + * Valet's Mac configuration directory. */ -function valetConfigPath(): string { +function valetMacConfigPath(): string { return path.resolve(os.homedir(), '.config', 'valet') } + +/** + * Valet Linux's configuration directory. + */ +function valetLinuxConfigPath(): string { + return path.resolve(os.homedir(), '.valet') +}