Skip to content

Commit

Permalink
Merge pull request #436 from bshy522/bugfix/env-static-dir
Browse files Browse the repository at this point in the history
bugfix: When the staticDir is set by the env, capure an error.
  • Loading branch information
Muhammed Thanish authored Sep 8, 2016
2 parents 048860a + 54962a8 commit 0b34ecf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ program
.version(packageJson.version)
.option('-p, --port [number]', 'Port to run Storybook (Required)', parseInt)
.option('-h, --host [string]', 'Host to run Storybook')
.option('-s, --static-dir <dir-names>', 'Directory where to load static files from', parseList)
.option('-s, --static-dir <dir-names>', 'Directory where to load static files from')
.option('-c, --config-dir [dir-name]', 'Directory where to load Storybook configurations from')
.option('-d, --db-path [db-file]', 'File where to store addon database JSON file')
.option('--enable-db', 'Enable the (experimental) addon database service on dev-server')
Expand Down Expand Up @@ -53,6 +53,7 @@ if (program.host) {
const app = express();

if (program.staticDir) {
program.staticDir = parseList(program.staticDir);
program.staticDir.forEach(dir => {
const staticPath = path.resolve(dir);
if (!fs.existsSync(staticPath)) {
Expand Down

0 comments on commit 0b34ecf

Please sign in to comment.