Skip to content

feat: add support for packaging and publishing without license file#887

Merged
joaomoreno merged 1 commit intomicrosoft:mainfrom
bandantonio:publish-with-no-license
Aug 30, 2023
Merged

feat: add support for packaging and publishing without license file#887
joaomoreno merged 1 commit intomicrosoft:mainfrom
bandantonio:publish-with-no-license

Conversation

@bandantonio
Copy link
Contributor

Resolves #779

@bandantonio bandantonio changed the title Add support for packaging and publishing without license file feat: add support for packaging and publishing without license file Aug 2, 2023
@kotborealis
Copy link

Just a suggestion: some cli-utilities have an -y/--yes/--assume-yes flag for usage in scripts, which automatically accepts all prompt.

image

I think it would be more intuitive to have this kind of flag.

@kotborealis
Copy link

Looking closely, there's even some code already in place to auto-accept prompts.

src/util.ts:

export function read(prompt: string, options: _read.Options = {}): Promise<string> {
	if (process.env['VSCE_TESTS'] || !process.stdout.isTTY) {
		return Promise.resolve('y');
	}

	return __read({ prompt, ...options });
}

However, VSCE_TESTS is not documented (?) and I don't feel really confident to use it.

Maybe we could add something like VSCE_YES/VSCE_ASSUME_YES env variable?

-	if (process.env['VSCE_TESTS'] || !process.stdout.isTTY) {
+ 	if (process.env['VSCE_ASSUME_YES'] || !process.stdout.isTTY) {

@joaomoreno joaomoreno added this to the August 2023 milestone Aug 30, 2023
@joaomoreno joaomoreno self-assigned this Aug 30, 2023
@joaomoreno joaomoreno merged commit e0857ea into microsoft:main Aug 30, 2023
@bandantonio bandantonio deleted the publish-with-no-license branch August 30, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vsce package lacks --no-license option

4 participants