exec

Basic Shell-like, async by default, command execution with no shell interpreter invocation process
0.1.0 Yanked release released
j8r/exec.cr
4
Julien Reichardt

This repo seems to be no longer available at j8r/exec.cr.

Git synchronization failed . Last successful sync was .

Help find it again! … or have it archived.

exec

Simple library to execute a program with arguments from Crystal

Installation

Add this block to your application's shard.yml:

dependencies:
  exec:
    github: j8r/exec

Usage

Methods

out : String - return the stdout("output") of the process if it exited normally with an exit code of 0, else return the stderr("error")

exit_code, exit_signal, exit_status, normal_exit?, signal_exit?, success?: same as the ones in the official Crystal API docs

Examples

Exec.new("/bin/true").success? # true

Exec.new("/bin/ls", ["/tmp", "-lh"]).exit_status # 0

Exec.new("/bin/pwd", "", "/tmp").out # "/tmp\n"

License

Copyright (c) 2017 Julien Reichardt - ISC License

exec:
  github: j8r/exec.cr
  version: ~> 0.1.0
License ISC
Crystal none

Authors

Dependencies 0

Development Dependencies 0

Dependents 1

Last synced .
search fire star recently