Skip to content

Commit 76a0637

Browse files
committed
Fix path generation
1 parent f421112 commit 76a0637

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
@@ -108,7 +108,7 @@ async function generateSchema(pathToSpec) {
108108
let outputFilePath = new URL(flags.output, CWD); // note: may be directory
109109
const isDir = fs.existsSync(outputFilePath) && fs.lstatSync(outputFilePath).isDirectory();
110110
if (isDir) {
111-
const filename = pathToSpec.replace(EXT_RE, ".ts");
111+
const filename = pathToSpec.replace(EXT_RE, ".ts").replace(/^https?:\/\//, '');
112112
outputFilePath = new URL(filename, outputFilePath);
113113
}
114114

0 commit comments

Comments
 (0)