Skip to content

Commit 23f837c

Browse files
authored
cmd/utils: avoid making console preloads absolute (ethereum#22109)
Resolves etclabscore/core-geth#273 jsre.JSRE already handles establishing preload file paths relative to the 'assets' path (aka docroot), where it joins the assets dir and the file path if relative, or uses the file path only if absolute. The duplication of this logic by MakeConsolePreloads caused preloaded files to have paths which contained duplicate references to the assets dir path. Date: 2020-12-30 08:25:01-06:00 Signed-off-by: meows <b5c6@protonmail.com>
1 parent 984e752 commit 23f837c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmd/utils/flags.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,9 +1908,8 @@ func MakeConsolePreloads(ctx *cli.Context) []string {
19081908
// Otherwise resolve absolute paths and return them
19091909
var preloads []string
19101910

1911-
assets := ctx.GlobalString(JSpathFlag.Name)
19121911
for _, file := range strings.Split(ctx.GlobalString(PreloadJSFlag.Name), ",") {
1913-
preloads = append(preloads, common.AbsolutePath(assets, strings.TrimSpace(file)))
1912+
preloads = append(preloads, strings.TrimSpace(file))
19141913
}
19151914
return preloads
19161915
}

0 commit comments

Comments
 (0)