Deploy preview build error

I am having trouble with deploy preview from a PR.

  • we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
    https://zippy-tulumba-5eac8c.netlify.app
  • DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
  • Build problems? Link or paste the FULL build log & build settings screenshot

3:41:02 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
3:41:00 PM: Netlify Build
3:41:00 PM: ────────────────────────────────────────────────────────────────
3:41:00 PM: ​
3:41:00 PM: ❯ Version
3:41:00 PM: @netlify/build 29.17.1
3:41:00 PM: ​
3:41:00 PM: ❯ Flags
3:41:00 PM: baseRelDir: true
3:41:00 PM: buildId: 64c1a0e5e012541f228ec89e
3:41:00 PM: deployId: 64c1a0e5e012541f228ec8a0
3:41:00 PM: ​
3:41:00 PM: ❯ Current directory
3:41:00 PM: /opt/build/repo
3:41:00 PM: ​
3:41:00 PM: ❯ Config file
3:41:00 PM: /opt/build/repo/netlify.toml
3:41:00 PM: ​
3:41:00 PM: ❯ Context
3:41:00 PM: deploy-preview
3:41:00 PM: ​
3:41:00 PM: build.command from netlify.toml
3:41:00 PM: ────────────────────────────────────────────────────────────────
3:41:00 PM: ​
3:41:00 PM: $ hugo --gc --minify --buildFuture $DEPLOY_PRIME_URL
3:41:00 PM: hugo is the main command, used to build your Hugo site.
3:41:00 PM: Hugo is a Fast and Flexible Static Site Generator
3:41:00 PM: built with love by spf13 and friends in Go.
3:41:00 PM: Complete documentation is available at https://gohugo.io/.
3:41:00 PM: Usage:
3:41:00 PM: hugo [flags]
3:41:00 PM: hugo [command]
3:41:00 PM: Available Commands:
3:41:00 PM: completion Generate the autocompletion script for the specified shell
3:41:00 PM: config Print the site configuration
3:41:00 PM: convert Convert your content to different formats
3:41:00 PM: deploy Deploy your site to a Cloud provider.
3:41:00 PM: env Print Hugo version and environment info
3:41:00 PM: gen A collection of several useful generators.
3:41:00 PM: help Help about any command
3:41:00 PM: import Import your site from others.
3:41:00 PM: list Listing out various types of content
3:41:00 PM: mod Various Hugo Modules helpers.
3:41:00 PM: new Create new content for your site
3:41:00 PM: server A high performance webserver
3:41:00 PM: version Print Hugo version and environment info
3:41:00 PM: Flags:
3:41:00 PM: -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
3:41:00 PM: -D, --buildDrafts include content marked as draft
3:41:00 PM: -E, --buildExpired include expired content
3:41:00 PM: -F, --buildFuture include content with publishdate in the future
3:41:00 PM: --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
3:41:00 PM: --cleanDestinationDir remove files from destination not found in static directories
3:41:00 PM: --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
3:41:00 PM: --config string config file (default is hugo.yaml|json|toml)
3:41:00 PM: --configDir string config dir (default config)
3:41:00 PM: -c, --contentDir string filesystem path to content directory
3:41:00 PM: --debug debug output
3:41:00 PM: -d, --destination string filesystem path to write files to
3:41:00 PM: --disableKinds strings disable different kind of pages (home, RSS etc.)
3:41:00 PM: --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
3:41:00 PM: -e, --environment string build environment
3:41:00 PM: --forceSyncStatic copy all files when static is changed.
3:41:00 PM: --gc enable to run some cleanup tasks (remove unused cache files) after the build
3:41:00 PM: --ignoreCache ignores the cache directory
3:41:00 PM: --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
3:41:00 PM: -l, --layoutDir string filesystem path to layout directory
3:41:00 PM: --logLevel string log level (debug|info|warn|error)
3:41:00 PM: --minify minify any supported output format (HTML, XML etc.)
3:41:00 PM: --noBuildLock don’t create .hugo_build.lock file
–noChmod don’t sync permission mode of files
–noTimes don’t sync modification time of files
–panicOnWarning panic on first WARNING log
3:41:00 PM: --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
3:41:00 PM: --printI18nWarnings print missing translations
3:41:00 PM: --printMemoryUsage print memory usage to screen at intervals
3:41:00 PM: --printPathWarnings print warnings on duplicate target paths etc.
3:41:00 PM: --printUnusedTemplates print warnings on unused templates.
3:41:00 PM: --quiet build in quiet mode
3:41:00 PM: --renderToMemory render to memory (only useful for benchmark testing)
3:41:00 PM: -s, --source string filesystem path to read files relative from
3:41:00 PM: --templateMetrics display metrics about template executions
3:41:00 PM: --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
3:41:00 PM: -t, --theme strings themes to use (located in /themes/THEMENAME/)
3:41:00 PM: --themesDir string filesystem path to themes directory
3:41:00 PM: --trace file write trace to file (not useful in general)
3:41:00 PM: -v, --verbose verbose output
3:41:00 PM: -w, --watch watch filesystem for changes and recreate as needed
3:41:00 PM: Use hugo [command] --help for more information about a command.
3:41:00 PM: Error: command error: unknown command https://deploy-preview-1--zippy-tulumba-5eac8c.netlify.app for hugo
3:41:00 PM: ​
3:41:00 PM: build.command failed
3:41:00 PM: ────────────────────────────────────────────────────────────────
3:41:00 PM: ​
3:41:00 PM: Error message
3:41:00 PM: Command failed with exit code 1: hugo --gc --minify --buildFuture $DEPLOY_PRIME_URL (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
3:41:00 PM: ​
3:41:00 PM: Error location
3:41:00 PM: In build.command from netlify.toml:
3:41:00 PM: hugo --gc --minify --buildFuture $DEPLOY_PRIME_URL
3:41:00 PM: ​
3:41:00 PM: Resolved config
3:41:00 PM: build:
3:41:00 PM: command: hugo --gc --minify --buildFuture $DEPLOY_PRIME_URL
3:41:00 PM: commandOrigin: config
3:41:00 PM: environment:
3:41:00 PM: - REVIEW_ID
3:41:00 PM: - HUGO_VERSION
3:41:00 PM: publish: /opt/build/repo/public
3:41:00 PM: publishOrigin: config
3:41:00 PM: redirects:
3:41:02 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:41:02 PM: Failing build: Failed to build site
3:41:02 PM: Finished processing build request in 15.602s

I think it should be:

hugo --gc --minify -F -b $DEPLOY_PRIME_URL