Commit Graph

11 Commits

Author SHA1 Message Date
Casey Rodarmor
1cb90f4e65
Use pub(crate) instead of pub (#471)
Eventually, there will probably be a `crate` visibility specifier that
does the same thing as `pub(crate)`. This commit replaces `pub` with
`pub(crate)`, so when `crate` is available we can easily switch to it.
2019-09-21 15:35:03 -07:00
Casey Rodarmor
74e45e7c05
Remove dependency on brev (#462)
Just's dependency on brev was the cause of a
fairly deep branch of the transitive dependency
tree. To decrease build time and make the life of
packagers easier, this diff moves the functionality
that Just was using in Brev into Just itself, and
removes the dependency on Brev.

Fortunately, the only functionality that Just was
using was the output function and OutputError
enum, so this was easily done.
2019-07-13 01:55:06 -07:00
Casey Rodarmor
fdb5c4f578
Typo: "command equivelant" -> "command equivalent" (#418) 2019-04-19 14:18:24 -07:00
Casey Rodarmor
3a287b864a
Housekeeping (#394)
- Upgrade to rust 2018
- Update dependencies
- Use BTree{Map,Set} instead of Map and Set
2019-04-11 15:23:14 -07:00
Casey Rodarmor
3d67786aaf
Förmatterdämmerung (#346)
Format with rustfmt
2018-12-08 14:29:41 -08:00
Joshua Warner
cf3fde442f Implement invocation_directory function (#312) 2018-06-19 13:13:21 -04:00
Casey Rodarmor
2b6b715528
Refactor Everything (#250) 2017-11-16 23:30:08 -08:00
Casey Rodarmor
165e7951af Use cygpath to translate paths on windows (#188)
I was previous doing it manually, which failed when running in
powershell in a Github Desktop for windows.

Use the `cygpath` utility instead.
2017-04-23 16:09:34 -07:00
Casey Rodarmor
832cf7b357 Move output() and OutputError into brev (#187)
They're pretty generic and generally useful, so move them into brev on crates.io.
2017-04-23 15:37:17 -07:00
Casey Rodarmor
84a55da1ce Make shebangs work on windows (#185)
We use EXEPATH, which points to the root of the MinGW installation
and can be used as a base for translating the unix path to the
executable in the shebang line.

If we're not on MinGW, well, we just throw up our hands and hope
for the best.
2017-04-22 21:39:29 -07:00
Casey Rodarmor
2b294f0b30 Create platform module (#178)
Moves platform specific functionality into its own module.

Thanks to @Meralis40 for starting this!

This also gets just building on windows \^_^/

Although a lot of tests still fail (✖╭╮✖)

The `PlatformInterface` trait contains functions which abstract
over platform specific functionality, with implementations for
different platforms behind #[cfg(*)] attributes.

- `make_shebang_command()` constructs a command which will execute
  the given script as if by a shebang. On linux this executes the
  file, on windows it runs the interpreter directly.

- `set_execute_permission()` sets the execute permission on a
  file. This is a nop on windows, since all files are executable.

- `signal_from_exit_status()` extracts the signal a process was
  halted by from its exit status, if it was halted by a signal.
2017-04-21 22:20:13 -07:00