In my environment, $LANG=ja_JP.UTF-8 is set by default and the output of aria2c --version is in Japanese.
In that case, the value of the aria2Ver is "aria2 バージョン" instead of "aria2 version", which does not match versionRegex = RegExp(/aria2 version (. *)/) and followiing process throws an error.
To solve this problem, change execSync('aria2c --version') to execSync('LANG=en_US.UTF-8 aria2c --version') so that the output of the command aria2c --version is always in English.
In my environment,
$LANG=ja_JP.UTF-8
is set by default and the output ofaria2c --version
is in Japanese.In that case, the value of the
aria2Ver
is "aria2 バージョン" instead of "aria2 version", which does not matchversionRegex = RegExp(/aria2 version (. *)/)
and followiing process throws an error.https://github.com/snobu/destreamer/blob/e93ad80ef6fcffb7d25936ffb4c9cf9a3d2d6f4e/src/Utils.ts#L216-L229
To solve this problem, change
execSync('aria2c --version')
toexecSync('LANG=en_US.UTF-8 aria2c --version')
so that the output of the commandaria2c --version
is always in English.