Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5a9cf20

Browse filesBrowse files
Look for certificates in valet linux config directory (#307)
* Look for certificates in valet linux config directory * Prefix mac valet function * Show log message on linux --------- Co-authored-by: Tim MacDonald <hello@timacdonald.me>
1 parent 7252168 commit 5a9cf20
Copy full SHA for 5a9cf20

File tree

Expand file treeCollapse file tree

1 file changed

+16
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+16
-5
lines changed

‎src/index.ts

Copy file name to clipboardExpand all lines: src/index.ts
+16-5Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function resolveLaravelPlugin(pluginConfig: Required<PluginConfig>): LaravelPlug
218218
server.config.logger.info(` ${colors.green('➜')} Using Herd certificate to secure Vite.`)
219219
}
220220

221-
if (resolvedConfig.server.https.key.startsWith(valetConfigPath())) {
221+
if (resolvedConfig.server.https.key.startsWith(valetMacConfigPath()) || resolvedConfig.server.https.key.startsWith(valetLinuxConfigPath())) {
222222
server.config.logger.info(` ${colors.green('➜')} Using Valet certificate to secure Vite.`)
223223
}
224224
}
@@ -580,8 +580,12 @@ function determineDevelopmentEnvironmentConfigPath(): string|undefined {
580580
return herdWindowsConfigPath()
581581
}
582582

583-
if (fs.existsSync(valetConfigPath())) {
584-
return valetConfigPath()
583+
if (fs.existsSync(valetMacConfigPath())) {
584+
return valetMacConfigPath()
585+
}
586+
587+
if (fs.existsSync(valetLinuxConfigPath())) {
588+
return valetLinuxConfigPath()
585589
}
586590
}
587591

@@ -622,8 +626,15 @@ function herdWindowsConfigPath(): string {
622626
}
623627

624628
/**
625-
* Valet's configuration directory.
629+
* Valet's Mac configuration directory.
626630
*/
627-
function valetConfigPath(): string {
631+
function valetMacConfigPath(): string {
628632
return path.resolve(os.homedir(), '.config', 'valet')
629633
}
634+
635+
/**
636+
* Valet Linux's configuration directory.
637+
*/
638+
function valetLinuxConfigPath(): string {
639+
return path.resolve(os.homedir(), '.valet')
640+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.