Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing iframe.html in output directory #5947

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

anru
Copy link
Contributor

@anru anru commented Mar 7, 2019

path.join is unsafe when using absolute paths after first argument.
For resolving from cwd path.resolve function is safe and makes correct results in both cases, using absolute or relative paths.

Issue:

There is no iframe.html after build-storybook -o /any/abs/path is successfully finished.

What I did

build-storybook -o /tmp/any/abs/path

How to test

pass any absolute path to -o cli argument to build-storybook command.

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

path.join is unsafe when using absolute paths after first argument.
For resolving from cwd path.resolve function is safe and makes correct results in both cases, using absolute or relative paths.
@anru anru requested review from alterx, igor-dv and tmeasday as code owners March 7, 2019 13:39
@anru anru changed the title Fixed building static in case of absolute output Fixed missing iframe.html in output directory Mar 7, 2019
@shilman shilman added this to the 5.0.x milestone Mar 7, 2019
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Ouch! Great catch!!! 👯

@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Mar 7, 2019
@shilman shilman merged commit 666b643 into storybookjs:next Mar 7, 2019
@anru anru deleted the patch-3 branch March 7, 2019 14:09
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Mar 8, 2019
shilman added a commit that referenced this pull request Mar 8, 2019
Fixed missing iframe.html in output directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cli patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants