Skip to content

Commit 77c8b39

Browse files
authored
Merge pull request #6255 from Cosifne/dev/shech/fixTagging
Fix Boolean coercion
2 parents 9ff2cae + 2939cbf commit 77c8b39

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tasks/createTagsTasks.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,25 @@ import { Octokit } from '@octokit/rest';
1111
interface Options {
1212
releaseVersion: string;
1313
releaseCommit: string;
14-
dryRun: boolean;
14+
// Even it is specified as boolean, it would still be parsed as string in compiled js.
15+
dryRun: string;
1516
}
1617

1718
gulp.task('createTags', async (): Promise<void> => {
1819
const options = minimist<Options>(process.argv.slice(2));
1920
console.log(`releaseVersion: ${options.releaseVersion}`);
2021
console.log(`releaseCommit: ${options.releaseCommit}`);
22+
const dryRun = options.dryRun.toLocaleLowerCase() === 'true';
23+
console.log(`dry run: ${dryRun}`);
2124

2225
const roslynCommit = await findRoslynCommitAsync();
2326
if (!roslynCommit) {
2427
logError('Failed to find roslyn commit.');
2528
return;
2629
}
2730

28-
if (options.dryRun) {
31+
// The compiled option value in js type is 'any' type.
32+
if (dryRun) {
2933
console.log('Tagging is skipped in dry run mode.');
3034
return;
3135
} else {

0 commit comments

Comments
 (0)