Skip to content

Commit 2a75edd

Browse files
committed
Print worktree directory on checkout
Also move logs to stderr to avoid confusion
1 parent 4dee9ec commit 2a75edd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rust/patchable/src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ type Result<T, E = Error> = std::result::Result<T, E>;
200200
#[snafu::report]
201201
fn main() -> Result<()> {
202202
tracing_subscriber::registry()
203-
.with(tracing_subscriber::fmt::layer())
203+
.with(tracing_subscriber::fmt::layer().with_writer(std::io::stderr))
204204
.with(
205205
tracing_subscriber::EnvFilter::builder()
206206
.with_default_directive(tracing_subscriber::filter::LevelFilter::INFO.into())
@@ -262,6 +262,9 @@ fn main() -> Result<()> {
262262
worktree.root = ?product_worktree_root,
263263
"worktree is ready!"
264264
);
265+
266+
// Print directory so you can run `cd $(cargo patchable checkout ...)`
267+
println!("{}", product_worktree_root.display());
265268
}
266269

267270
Cmd::Export { pv } => {

0 commit comments

Comments
 (0)