LoginSignup
10
2

More than 3 years have passed since last update.

作業ディレクトリを指定するオプションまとめ

Last updated at Posted at 2020-11-26

普段は作業ディレクトリに移動して実行することが多いコマンドについて、作業ディレクトリを指定するオプションをまとめました。(ツールに偏りがありますが・・・)

artisan (Laravel)

実行したいプロジェクトの artisan ファイルを絶対パスで指定する。

php /path/to/project/artisan migrate

Composer

--working-dir オプションまたは -d オプション

composer install --working-dir=/path/to/project
composer install -d /path/to/project

Global Options - Command-line interface / Commands - Composer

Git

-C オプション

git -C /path/to/project pull

-C - Git - git Documentation

npm

--prefix オプション

npm install --prefix /path/to/project

prefix - config | npm Docs

Yarn

--cwd オプション

yarn --cwd /path/to/project install

Specify working directory with yarn --cwd - CLI Introduction | Yarn

10
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
2