0
0

More than 5 years have passed since last update.

ComposerでDotenv values containing spaces must be surrounded by quotes.となったときの対応方法

Posted at
  • 環境
    • Windows10 64bit
    • Composer version 1.6.5

事象 : composerを動かしたら怒られた

$ composer install
Loading composer repositories with package information
# 省略
In Loader.php line 228:

  Dotenv values containing spaces must be surrounded by quotes.


Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

原因 : .envの設定値でダブルクォーテーションに囲まれていないスペースがあるから

エラー Dotenv values containing spaces must be surrounded by quotes. が出た時 - あじちゃんのブログ。備忘録。

対応方法 : 見つけてダブルクォーテーションで囲む

grep | 正規表現を利用したテキストのパターン抽出

$ cd {.envのあるディレクトリ}
# コメント以外の行でスペースを含む行を見つける
$ grep -v '^#' .env | grep ' '
# .envを開いてダブルクォーテーションで囲む
$ vi .env
0
0
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
0
0