Skip to content

Commit 17c5438

Browse files
authored
fix: If encoding is passed to svn.ts it uses that rather than guessing (#499)
fixes #483
1 parent d8dd30b commit 17c5438

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/svn.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class Svn {
116116
// Force non interactive environment
117117
args.push("--non-interactive");
118118

119-
let encoding = options.encoding || "utf8";
119+
let encoding = options.encoding || "";
120120
delete options.encoding;
121121

122122
const defaults: cp.SpawnOptions = {
@@ -171,7 +171,7 @@ export class Svn {
171171
// SVN with '--xml' always return 'UTF-8', and jschardet detects this encoding: 'TIS-620'
172172
if (args.includes("--xml")) {
173173
encoding = "utf8";
174-
} else {
174+
} else if (encoding === "") {
175175
const defaultEncoding = configuration.get<string>("default.encoding");
176176
if (defaultEncoding) {
177177
if (!iconv.encodingExists(defaultEncoding)) {

0 commit comments

Comments
 (0)