create container
This commit is contained in:
@@ -33,7 +33,7 @@ const CLEAN_RUN_ARGUMENT_NAME: &str = "clean-run";
|
||||
const VERBOSE_ARGUMENT_NAME: &str = "verbose";
|
||||
const IDE_ID_ARGUMENT_NAME: &str = "ide-id";
|
||||
|
||||
fn main() {
|
||||
fn main() {
|
||||
|
||||
let start_ide_file_arg =Arg::with_name(START_FILE_ARGUMENT_NAME)
|
||||
.short("s")
|
||||
@@ -50,7 +50,7 @@ fn main() {
|
||||
.default_value("{}")
|
||||
.takes_value(true);
|
||||
|
||||
let matches =
|
||||
let matches =
|
||||
App::new("nixidectl")
|
||||
.version("0.1.0")
|
||||
.author("stubbfel")
|
||||
@@ -59,11 +59,11 @@ fn main() {
|
||||
.arg(&start_ide_file_arg)
|
||||
.arg(&start_ide_arguments_args)
|
||||
.arg(Arg::with_name(CLEAN_RUN_ARGUMENT_NAME)
|
||||
.short("c")
|
||||
.short("c")
|
||||
.long("clean-run")
|
||||
.help("clean app folder, before start runnnig"))
|
||||
.arg(Arg::with_name(VERBOSE_ARGUMENT_NAME)
|
||||
.short("v")
|
||||
.short("v")
|
||||
.long("verbose")
|
||||
.help("verbose")))
|
||||
.subcommand(SubCommand::with_name(STOP_SUBCOMMAND_NAME)
|
||||
@@ -90,7 +90,7 @@ fn main() {
|
||||
.help("the name of the ide serive")
|
||||
.default_value("nixide")
|
||||
.takes_value(true)
|
||||
.global(true))
|
||||
.global(true))
|
||||
.subcommand(SubCommand::with_name(INSTALL_SUBCOMMAND_NAME)
|
||||
.arg(&start_ide_file_arg)
|
||||
.arg(&start_ide_arguments_args)
|
||||
@@ -111,7 +111,7 @@ fn main() {
|
||||
_ => "run_ide.sh"
|
||||
};
|
||||
|
||||
let nix_expression = format!("with import <nixpkgs> {{}}; callPackage {} {}", file, args);
|
||||
let nix_expression = format!("with import <nixpkgs> {{}}; callPackage {} {}", file, args);
|
||||
let cmd = Command::new("nix-shell")
|
||||
.stderr(Stdio::null())
|
||||
//.stdout(Stdio::null())
|
||||
@@ -123,7 +123,7 @@ fn main() {
|
||||
.arg(run_script)
|
||||
.spawn()
|
||||
.expect("start ide command failed");
|
||||
|
||||
|
||||
let out = cmd.stdout.ok_or_else(|| Error::new(ErrorKind::Other,"Could not capture standard output.")).unwrap();
|
||||
let reader = BufReader::new(out);
|
||||
let start_up_log = reader.lines()
|
||||
|
||||
Reference in New Issue
Block a user