Skip to content

Commit 04dac76

Browse files
committed
fix: add validate flags
1 parent 2244836 commit 04dac76

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/commands/project/deploy/start.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ export default class DeployMetadata extends SfCommand<DeployResultJson> {
199199
throw messages.createError('error.NoTestsSpecified');
200200
}
201201

202+
const noDeployFlags = !flags['source-dir'] && !flags.manifest && !flags.metadata && !flags['metadata-dir'];
203+
204+
if (noDeployFlags && !(await flags['target-org'].tracksSource())) {
205+
this.warn(messages.getMessage('noSourceTrackingWarning'));
206+
}
207+
202208
const api = await resolveApi(this.configAggregator);
203209
const username = flags['target-org'].getUsername();
204210
const title = flags['dry-run'] ? 'Deploying Metadata (dry-run)' : 'Deploying Metadata';

0 commit comments

Comments
 (0)