Patch nox to allow running some commands which would be skipped if --install-only is passed.
(session, *command, **kwargs)
| 111 | |
| 112 | |
| 113 | def session_run_always(session, *command, **kwargs): |
| 114 | """ |
| 115 | Patch nox to allow running some commands which would be skipped if --install-only is passed. |
| 116 | """ |
| 117 | try: |
| 118 | # Guess we weren't the only ones wanting this |
| 119 | # https://github.com/theacodes/nox/pull/331 |
| 120 | return session.run_always(*command, **kwargs) |
| 121 | except AttributeError: |
| 122 | old_install_only_value = session._runner.global_config.install_only |
| 123 | try: |
| 124 | # Force install only to be false for the following chunk of code |
| 125 | # For additional information as to why see: |
| 126 | # https://github.com/theacodes/nox/pull/181 |
| 127 | session._runner.global_config.install_only = False |
| 128 | return session.run(*command, **kwargs) |
| 129 | finally: |
| 130 | session._runner.global_config.install_only = old_install_only_value |
| 131 | |
| 132 | |
| 133 | def find_session_runner(session, name, python_version, onedir=False, **kwargs): |