Skip to content

cmd/utils: avoid making console preloads absolute#22109

Merged
gballet merged 1 commit into
ethereum:masterfrom
etclabscore:fix/localconsole-jspath-preload-pathfinding-foundation
Jan 12, 2021
Merged

cmd/utils: avoid making console preloads absolute#22109
gballet merged 1 commit into
ethereum:masterfrom
etclabscore:fix/localconsole-jspath-preload-pathfinding-foundation

Conversation

@meowsbits
Copy link
Copy Markdown
Contributor

Resolves etclabscore/core-geth#273.
I believe this issue will be equivalent at ethereum/go-ethereum since this logic is unmodified.

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

…ocroot)

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>
@fjl fjl changed the title utils: MakeConsolePreloads agnostic of --jspath (console assets dir/docroot) cmd/utils: avoid making console preloads absolute Jan 5, 2021
Copy link
Copy Markdown
Member

@gballet gballet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, LGTM

@gballet gballet added this to the 1.10.0 milestone Jan 12, 2021
@gballet gballet merged commit 23f837c into ethereum:master Jan 12, 2021
bulgakovk pushed a commit to bulgakovk/go-ethereum that referenced this pull request Jan 26, 2021
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console: --jspath & --preload fails with 'no such file or directory' (duplicate relative path)

4 participants