Skip to content

Commit

Permalink
Updating the error message that appears when we can't find an OAS.
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion committed Jun 24, 2019
1 parent 40354c2 commit 33d6f9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ exports.run = function({ args, opts }) {

reject(
new Error(
'We were unable to locate a Swagger or OpenAPI file to upload.\n' +
"Don't worry, it's easy to get started! Run `rdme oas init` to get started.",
"We couldn't find a Swagger or OpenAPI file.\n\n" +
'Run `rdme swagger ./path/to/file` to upload an existing file or `rdme oas init` to create a fresh one!',
),
);
});
Expand Down
4 changes: 2 additions & 2 deletions test/swagger.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ describe('swagger command', () => {

it('should error if no file was provided or able to be discovered', () => {
expect(swagger([], { key })).rejects.toThrow(
'We were unable to locate a Swagger or OpenAPI file to upload.\n' +
"Don't worry, it's easy to get started! Run `rdme oas init` to get started.",
"We couldn't find a Swagger or OpenAPI file.\n\n" +
'Run `rdme swagger ./path/to/file` to upload an existing file or `rdme oas init` to create a fresh one!',
);
});

Expand Down

0 comments on commit 33d6f9d

Please sign in to comment.