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

It fails when used as cargo osha #2

Open
vi opened this issue Jun 20, 2018 · 3 comments
Open

It fails when used as cargo osha #2

vi opened this issue Jun 20, 2018 · 3 comments

Comments

@vi
Copy link

vi commented Jun 20, 2018

I expect it to scan the whole crate/project, but instead it tries to open a non-existing file osha:

$ RUST_BACKTRACE=1 cargo osha
Processing file osha
thread 'main' panicked at 'Unable to open file: Os { code: 2, kind: NotFound, message: "No such file or directory" }', libcore/result.rs:945:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:463
   5: std::panicking::begin_panic_fmt
             at libstd/panicking.rs:350
   6: rust_begin_unwind
             at libstd/panicking.rs:328
   7: core::panicking::panic_fmt
             at libcore/panicking.rs:71
   8: core::result::unwrap_failed
   9: cargo_osha::main
  10: std::rt::lang_start::{{closure}}
  11: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  12: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  13: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:374
             at libstd/rt.rs:58
  14: main
  15: __libc_start_main
  16: _start
@icefoxen
Copy link
Owner

icefoxen commented Jun 20, 2018

As it says in the readme, Not actually a cargo plugin yet. 😞

@anderejd anderejd mentioned this issue Jun 20, 2018
@dtolnay
Copy link
Contributor

dtolnay commented Aug 27, 2018

Workaround: rustup run nightly cargo-osha.

@vi
Copy link
Author

vi commented Aug 27, 2018

@dtolnay , Or just use cargo-geiger, which is based/inspired by this project.

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

No branches or pull requests

3 participants