Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Tasks/DotNetCoreCLIV2/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,15 @@ describe('DotNetCoreExe Suite', function () {
assert(tr.failed, 'task should have failed');
});

it('test throws warning when zero match found', async () => {
it('test fails when zero match found', async () => {
process.env["__projects__"] = "*fail*/project.json";
process.env["__command__"] = "test";
let tp = path.join(__dirname, 'validInputs.js')
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
await tr.runAsync();

assert(tr.invokedToolCount == 0, 'should not have invoked tool');
assert(tr.succeeded, 'task should have succeeded');
assert(tr.warningIssues && tr.warningIssues.length, 'Should have thrown a warning in the stream');
assert(tr.failed, 'task should have failed');
});

it('publish works with explicit project files setting modifyoutput to false', async () => {
Expand Down
3 changes: 1 addition & 2 deletions Tasks/DotNetCoreCLIV2/dotnetcore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ export class dotNetExe {
// Use empty string when no project file is specified to operate on the current directory
const projectFiles = this.getProjectFiles();
if (projectFiles.length === 0) {
tl.warning(tl.loc('noProjectFilesFound'));
return;
throw tl.loc('noProjectFilesFound');
}

const failedProjects: string[] = [];
Expand Down