-
-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Windows上でVivliostyle CLIのpreviewやbuildコマンドを実行するとき、コマンドラインで指定する入力ファイルがカレントドライブ以外のドライブにあるとき、エラーが発生します。以下、WindowsのPowerShell上での実行例:
PS C:\Users\Shinyu\clitest> vivliostyle preview D:\viv\clitest\i627\content\index.html
ERROR Error: The output path is set to "output.pdf", but this will overwrite the working directory of Vivliostyle. Please specify a different path.
at resolveTaskConfig (file:///C:/Users/Shinyu/AppData/Local/nvm/v22.21.1/node_modules/@vivliostyle/cli/dist/chunk-YNX6D2I6.js:705:13)
at preview (file:///C:/Users/Shinyu/AppData/Local/nvm/v22.21.1/node_modules/@vivliostyle/cli/dist/chunk-NVNEYZ3J.js:38:16)
at async file:///C:/Users/Shinyu/AppData/Local/nvm/v22.21.1/node_modules/@vivliostyle/cli/dist/commands/preview.js:105:3
If you think this is a bug, please report at https://github.com/vivliostyle/vivliostyle-cli/issues
PS C:\Users\Shinyu\clitest> vivliostyle build D:\viv\clitest\i627\content\index.html
INFO Start building
ERROR Error: The output path is set to "output.pdf", but this will overwrite the working directory of Vivliostyle. Please specify a different path.
at resolveTaskConfig (file:///C:/Users/Shinyu/AppData/Local/nvm/v22.21.1/node_modules/@vivliostyle/cli/dist/chunk-YNX6D2I6.js:705:13)
at build (file:///C:/Users/Shinyu/AppData/Local/nvm/v22.21.1/node_modules/@vivliostyle/cli/dist/chunk-ALY3QX7K.js:1132:20)
at async file:///C:/Users/Shinyu/AppData/Local/nvm/v22.21.1/node_modules/@vivliostyle/cli/dist/commands/build.js:181:3
If you think this is a bug, please report at https://github.com/vivliostyle/vivliostyle-cli/issues
このように、カレントドライブが C: で、入力ファイルとして D: ドライブにあるファイルを指定したとき、previewとbuildのどちらでも、
ERROR Error: The output path is set to "output.pdf", but this will overwrite the working directory of Vivliostyle. Please specify a different path.
というエラーになります。このエラーメッセージがとても理解しにくいです。previewでも「The output path is set to "output.pdf"」と出ることや、「The output path is set to "output.pdf"」と「this will overwrite the working directory of Vivliostyle」がどうつながるのか、それが何を意味しているのか、そして「Please specify a different path」というのは「output path」を別のものにしろということなのか、よくわかりません。
ためしに --output オプションで「output path」を別のものに変えてテストしたのですが、previewの場合は「unknown option '--output'」エラーに、
PS C:\Users\Shinyu\clitest> vivliostyle preview D:\viv\clitest\i627\content\index.html --output test.pdf
error: unknown option '--output'
buildの場合は「output path」として何を指定してもエラーメッセージの "output.pdf" の部分がその指定したoutput pathになるだけで、変わりません。例:
PS C:\Users\Shinyu\clitest> vivliostyle build D:\viv\clitest\i627\content\index.html --output D:\viv\clitest\i627\content\test.pdf
INFO Start building
ERROR Error: The output path is set to "D:/viv/clitest/i627/content/test.pdf", but this will overwrite the original manuscript file. Please specify a different path.
at resolveTaskConfig (file:///C:/Users/Shinyu/AppData/Local/nvm/v22.21.1/node_modules/@vivliostyle/cli/dist/chunk-YNX6D2I6.js:700:13)
at build (file:///C:/Users/Shinyu/AppData/Local/nvm/v22.21.1/node_modules/@vivliostyle/cli/dist/chunk-ALY3QX7K.js:1132:20)
at async file:///C:/Users/Shinyu/AppData/Local/nvm/v22.21.1/node_modules/@vivliostyle/cli/dist/commands/build.js:181:3
If you think this is a bug, please report at https://github.com/vivliostyle/vivliostyle-cli/issues