Skip to content

Commit 550fcae

Browse files
committed
Fix path generation
1 parent 477d9a6 commit 550fcae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async function generateSchema(pathToSpec) {
107107
let outputFilePath = new URL(flags.output, CWD); // note: may be directory
108108
const isDir = fs.existsSync(outputFilePath) && fs.lstatSync(outputFilePath).isDirectory();
109109
if (isDir) {
110-
const filename = pathToSpec.replace(EXT_RE, ".ts");
110+
const filename = pathToSpec.replace(EXT_RE, ".ts").replace(/^https?:\/\//, '');
111111
outputFilePath = new URL(filename, outputFilePath);
112112
}
113113

0 commit comments

Comments
 (0)