title: pipenv custom scripts on wsl 2: shlex.py instream object has not attribute read
body: <p>I moved my python project from a native Linux installation to Windows and I tried to run pipenv custom scripts through WSL 2 on Windows 10 using <code>pipenv run my_script</code>.
  Although the same command works in a native Ubuntu installation, on WSL 2 (Ubuntu 20.04) I get an Attribute error in the shlex module regarding the instream object not having attribute read.</p>
  <p>My [scripts] section in the Pipfile looks like this, but I've also tried running python scripts (instead of shell ones) and the error can be reproduced with any custom script.</p>
  <pre><code>[scripts]
  build = &quot;bash ./scripts/main.sh -b&quot;
  analyze = &quot;bash ./scripts/main.sh -a&quot;
  </code></pre>
  <p>I've also tried to update the pipenv package but looks like I'm running the latest version (11.9.0, pipenv-2020.6.2).</p>
  <p>My code doesn't seem to run at all since I get an error before the arguments are passed to the custom script. This is the stacktrace I get from running the command:</p>
  <pre><code>Traceback (most recent call last):
  File &quot;/usr/bin/pipenv&quot;, line 11, in &lt;module&gt;
    load_entry_point('pipenv==11.9.0', 'console_scripts', 'pipenv')()
  File &quot;/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py&quot;, line 722, in __call__
    return self.main(*args, **kwargs)
  File &quot;/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py&quot;, line 697, in main
    rv = self.invoke(ctx)
  File &quot;/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py&quot;, line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File &quot;/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py&quot;, line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File &quot;/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py&quot;, line 535, in invoke
    return callback(*args, **kwargs)
  File &quot;/usr/lib/python3/dist-packages/pipenv/cli.py&quot;, line 602, in run
    core.do_run(command=command, args=args, three=three, python=python)
  File &quot;/usr/lib/python3/dist-packages/pipenv/core.py&quot;, line 2200, in do_run
    command = ' '.join(project.scripts[command])
  File &quot;/usr/lib/python3/dist-packages/pipenv/project.py&quot;, line 374, in scripts
    scripts[k] = shlex.split(v, posix=True)
  File &quot;/usr/lib/python3.8/shlex.py&quot;, line 311, in split
    return list(lex)
  File &quot;/usr/lib/python3.8/shlex.py&quot;, line 300, in __next__
    token = self.get_token()
  File &quot;/usr/lib/python3.8/shlex.py&quot;, line 109, in get_token
    raw = self.read_token()
  File &quot;/usr/lib/python3.8/shlex.py&quot;, line 140, in read_token
    nextchar = self.instream.read(1)
  AttributeError: 'list' object has no attribute 'read'
  </code></pre>