Bugfix for Windows builds.
This commit is contained in:
parent
2fd2a025c3
commit
f5c8ae309c
|
@ -57,13 +57,28 @@ export default class Converter
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly _path: string,
|
path: string,
|
||||||
private readonly _initFile: string,
|
private readonly _initFile: string,
|
||||||
private readonly _options: Options,
|
private readonly _options: Options,
|
||||||
private readonly _logger: Logger,
|
private readonly _logger: Logger,
|
||||||
) {}
|
) {
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
// TODO:
|
||||||
|
// On Windows, when passing the path of input file to makeinfo,
|
||||||
|
// using backslashes in path name breaks some other command line
|
||||||
|
// options (notably, -I).
|
||||||
|
// Not sure if this is a bug of makeinfo, or perl, or neither.
|
||||||
|
// We should look into this issue sometime later.
|
||||||
|
this._path = path.replace(/\\/g, '/');
|
||||||
|
} else {
|
||||||
|
this._path = path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly _path: string;
|
||||||
|
|
||||||
private _addIncludePaths(paths: readonly string[], options: string[]) {
|
private _addIncludePaths(paths: readonly string[], options: string[]) {
|
||||||
|
if (paths.length === 0) return;
|
||||||
const separator = process.platform === 'win32' ? ';' : ':';
|
const separator = process.platform === 'win32' ? ';' : ':';
|
||||||
options.push('-I', paths.join(separator));
|
options.push('-I', paths.join(separator));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue