Skip to content

Commit

Permalink
fix: replace bad doc URL in output (#6460)
Browse files Browse the repository at this point in the history
When the framework isn't detected, a message is printed to stdout. Currently, this includes a link
to a page that provides no useful information about framework detection. This replaces the URL with
an actionable one.
  • Loading branch information
serhalp committed Mar 26, 2024
1 parent 150ca0a commit 31ef216
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/utils/detect-server-settings.ts
Expand Up @@ -94,7 +94,7 @@ const DEFAULT_STATIC_PORT = 3999
const getDefaultDist = (workingDir: string) => {
log(`${NETLIFYDEVWARN} Unable to determine public folder to serve files from. Using current working directory`)
log(`${NETLIFYDEVWARN} Setup a netlify.toml file with a [dev] section to specify your dev server settings.`)
log(`${NETLIFYDEVWARN} See docs at: https://cli.netlify.com/netlify-dev#project-detection`)
log(`${NETLIFYDEVWARN} See docs at: https://docs.netlify.com/cli/local-development/#project-detection`)
return workingDir
}

Expand Down
10 changes: 5 additions & 5 deletions tests/integration/__snapshots__/framework-detection.test.js.snap
Expand Up @@ -5,7 +5,7 @@ exports[`frameworks/framework-detection > should default to process.cwd() and st
◈ No app server detected. Using simple static server
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://cli.netlify.com/netlify-dev#project-detection
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Running static server from \\"site-with-index-file\\"
◈ Setting up local development server
Expand Down Expand Up @@ -34,7 +34,7 @@ exports[`frameworks/framework-detection > should filter frameworks with no dev c
◈ No app server detected. Using simple static server
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://cli.netlify.com/netlify-dev#project-detection
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Running static server from \\"site-with-gulp\\"
◈ Setting up local development server
Expand Down Expand Up @@ -73,7 +73,7 @@ exports[`frameworks/framework-detection > should not run framework detection if
"◈ Netlify Dev ◈
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://cli.netlify.com/netlify-dev#project-detection
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Setting up local development server
◈ Starting Netlify Dev with custom config
hello
Expand All @@ -96,7 +96,7 @@ exports[`frameworks/framework-detection > should print specific error when comma
"◈ Netlify Dev ◈
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://cli.netlify.com/netlify-dev#project-detection
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Setting up local development server
◈ Starting Netlify Dev with #custom
◈ Failed running command: oops-i-did-it-again forgot-to-use-a-valid-command. Please verify 'oops-i-did-it-again' exists"
Expand Down Expand Up @@ -179,7 +179,7 @@ exports[`frameworks/framework-detection > should use static server when framewor
◈ Using simple static server because '[dev.framework]' was set to '#static'
◈ Unable to determine public folder to serve files from. Using current working directory
◈ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
◈ See docs at: https://cli.netlify.com/netlify-dev#project-detection
◈ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
◈ Running static server from \\"site-with-index-file\\"
◈ Setting up local development server
Expand Down

2 comments on commit 31ef216

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,327
  • Package size: 297 MB
  • Number of ts-expect-error directives: 1,029

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,327
  • Package size: 297 MB
  • Number of ts-expect-error directives: 1,029

Please sign in to comment.