We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c1de03 commit 1e7fc92Copy full SHA for 1e7fc92
1 file changed
src/commands/deploy/deploy.ts
@@ -1,6 +1,7 @@
1
import { type Stats } from 'fs'
2
import { stat } from 'fs/promises'
3
import { basename, resolve } from 'path'
4
+import { stdin, stdout } from 'process'
5
6
import type { NetlifyAPI } from '@netlify/api'
7
import { type NetlifyConfig, type OnPostBuild, runCoreSteps } from '@netlify/build'
@@ -118,6 +119,14 @@ const getDeployFolder = async ({
118
119
}
120
121
if (!deployFolder) {
122
+ if (!stdin.isTTY || !stdout.isTTY) {
123
+ // non interactive - can't get the value, resolve to the cwd
124
+ if (command.workspacePackage) {
125
+ return command.jsWorkspaceRoot || site.root
126
+ }
127
+ return command.workingDir
128
129
+
130
log('Please provide a publish directory (e.g. "public" or "dist" or "."):')
131
132
// Generate copy-pasteable command with current options
0 commit comments