Skip to content
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

feat(docker): Enter docker directly when no arguments #191

Merged
merged 2 commits into from
Sep 20, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
* Respect package file path in `autoload` command (44c042445bba0dd071d9112e58549437b7ebd58d)
* fix(vcpkg): Use workaround for `MODULE_NOT_FOUND` error (#187)
* Add docker command (#188)
* Enter docker directly when no arguments (#191)

## 0.8.x
> Released Mar 08, 2023
Expand Down
12 changes: 9 additions & 3 deletions cmds/core/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports.handler = async (argv) => {
}

let project_dir = convert_path(process.cwd());
if (!project_dir.startsWith('/')) {
if (!project_dir.startsWith('/')) { // XXX: Ensure compatible to Unix path!
project_dir = '/' + project_dir;
}
let container_dir = '/' + path.basename(project_dir);
Expand All @@ -51,9 +51,15 @@ exports.handler = async (argv) => {
let default_cmd = ['docker', 'run', '--rm',
'-v', container_arg,
'-w', container_dir,
'silex/emacs:' + argv.version + '-ci-eask',
'eask'];
'silex/emacs:' + argv.version + '-ci-eask',];
let rest = process.argv.slice(4);

// If no argument; we enter the container directly!
if (rest.length == 0)
default_cmd.splice(2, 0, '-it');
else
default_cmd.push('eask');

let cmd = default_cmd.concat(rest);

let proc = child_process.spawn(UTIL.cli_args(cmd), { stdio: 'inherit', shell: true });
Expand Down
Loading