Run the `cd` command.
(self)
| 38 | |
| 39 | /// Run the `cd` command. |
| 40 | pub fn run(self) -> Result<Option<Output>> { |
| 41 | // `std::env::set_current_dir` changes the current directory of the process |
| 42 | // (our shell in this case). |
| 43 | std::env::set_current_dir(&self.dir)?; |
| 44 | // The `cd` command doesn't produce any output. |
| 45 | Ok(None) |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | /// The `exit` command exits the shell. |
no test coverage detected