diff options
| author | YummyOreo <bobgim20@gmail.com> | 2024-01-14 02:48:50 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-14 10:48:50 +0000 |
| commit | 33eedf93b62041be899d2c1abe171d318b755add (patch) | |
| tree | 27c2f73da5897b80b2de0b5d7d8fa586bd8c11f9 | |
| parent | feat(ui): vim mode (#1553) (diff) | |
| download | atuin-33eedf93b62041be899d2c1abe171d318b755add.zip | |
fix(windows): disables unix specific stuff for windows (#1557)
* fix(windows): disables unix specific stuff for windows (windows has this on by default iirc)
* refactor: use windows not target_family
| -rw-r--r-- | atuin/src/command/mod.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/atuin/src/command/mod.rs b/atuin/src/command/mod.rs index c76030bd..0f31d8a3 100644 --- a/atuin/src/command/mod.rs +++ b/atuin/src/command/mod.rs @@ -2,6 +2,7 @@ use clap::{CommandFactory, Subcommand}; use clap_complete::{generate, generate_to, Shell}; use eyre::Result; +#[cfg(not(windows))] use rustix::{fs::Mode, process::umask}; #[cfg(feature = "client")] @@ -48,10 +49,13 @@ pub enum AtuinCmd { impl AtuinCmd { pub fn run(self) -> Result<()> { - // set umask before we potentially open/create files - // or in other words, 077. Do not allow any access to any other user - let mode = Mode::RWXG | Mode::RWXO; - umask(mode); + #[cfg(not(windows))] + { + // set umask before we potentially open/create files + // or in other words, 077. Do not allow any access to any other user + let mode = Mode::RWXG | Mode::RWXO; + umask(mode); + } match self { #[cfg(feature = "client")] |
