Skip to content

Commit

Permalink
Nitpick: prefer --directory flag over cd (#3215)
Browse files Browse the repository at this point in the history
## 📝 Summary

Right now when you export to html-wasm this line is shown: 

```
To run the exported notebook, use:
  cd docs/index.html && python -m http.server
```

It works, but the `cd` is a side effect. Might be nice to be able to do
without it?

## 🔍 Description of Changes

You can use a `--directory` flag for `python -m http.server` instead.
Might be preferable? This way you don't have to worry about cd'ing in
and out.

## 📜 Reviewers


@akshayka OR @mscolnick
  • Loading branch information
koaning authored Dec 18, 2024
1 parent a463739 commit 3fbe88d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion marimo/_cli/export/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def export_callback(file_path: MarimoPath) -> ExportResult:

echo(
"To run the exported notebook, use:\n"
f" cd {output} && python -m http.server\n"
f" python -m http.server --directory {output}\n"
"Then open the URL that is printed to your terminal."
)

Expand Down

0 comments on commit 3fbe88d

Please sign in to comment.