Skip to content

Current dir #22505

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

Merged
merged 3 commits into from
Feb 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/rustbook/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

//! Implementation of the `build` subcommand, used to compile a book.

use std::os;
use std::env;
use std::old_io;
use std::old_io::{fs, File, BufferedWriter, TempDir, IoResult};
Expand Down Expand Up @@ -82,7 +81,7 @@ fn render(book: &Book, tgt: &Path) -> CliResult<()> {

let src;
if env::args().len() < 3 {
src = os::getcwd().unwrap().clone();
src = env::current_dir().unwrap().clone();
} else {
src = Path::new(env::args().nth(2).unwrap().clone());
}
Expand Down Expand Up @@ -150,7 +149,7 @@ impl Subcommand for Build {
}
fn usage(&self) {}
fn execute(&mut self, term: &mut Term) -> CommandResult<()> {
let cwd = os::getcwd().unwrap();
let cwd = env::current_dir().unwrap();
let src;
let tgt;

Expand Down
1 change: 0 additions & 1 deletion src/rustbook/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#![feature(collections)]
#![feature(core)]
#![feature(old_io)]
#![feature(os)]
#![feature(env)]
#![feature(old_path)]
#![feature(rustdoc)]
Expand Down
4 changes: 2 additions & 2 deletions src/rustbook/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use error::Error;
use term::Term;
use book;
use std::old_io::{Command, File};
use std::os;
use std::env;

struct Test;

Expand All @@ -35,7 +35,7 @@ impl Subcommand for Test {
}
fn usage(&self) {}
fn execute(&mut self, term: &mut Term) -> CommandResult<()> {
let cwd = os::getcwd().unwrap();
let cwd = env::current_dir().unwrap();
let src = cwd.clone();

let summary = File::open(&src.join("SUMMARY.md"));
Expand Down