Jay Soffian
9a7ed8be09
Force gem installation into envdir
...
RubyGems allows OS packagers to specify defaults for `--install-dir`
and `--bindir` and these take precedence over `GEM_HOME`. The only way
to override the defaults is to explicitly specify the options ourselves
when running `gem install`.
Examples of OSes where this is the case are RedHat 9.2 and Gentoo.
Fixes #2799 .
2023-06-13 18:03:52 -04:00
Anthony Sottile
8d84a7a270
resources_bytesio is only used by ruby
2023-02-20 21:47:01 -05:00
Anthony Sottile
d3883ce7f7
move languages.all and languages.helpers out of languages
2023-02-20 18:03:45 -05:00
Anthony Sottile
7260d24d0f
Revert "also ignore Gemfile in project"
...
This reverts commit f4bd44996c .
2023-02-01 18:17:24 -05:00
Anthony Sottile
f4bd44996c
also ignore Gemfile in project
...
this starts failing with ruby 3.2.0
2023-01-28 16:44:44 -05:00
Anthony Sottile
628c876b2d
adjust the run_hook api to no longer take Hook
2023-01-16 16:34:01 -05:00
Anthony Sottile
ae34a962d7
make in_env part of the language api
2023-01-16 15:36:29 -05:00
Anthony Sottile
05c8911363
simplify environment_dir
2023-01-01 21:11:56 -05:00
Anthony Sottile
d05b7888ab
move clean_path_on_failure out of each hook install
2023-01-01 20:04:58 -05:00
Paul Gey
a54391e96f
Force gem installation into GEM_HOME
...
When `--user-install` is set in the gemrc config file, `gem` ignores
`GEM_HOME`. `--no-user-install` prevents this behaviour.
2022-05-07 20:44:02 +02:00
Anthony Sottile
07554e9525
add additional info to healthy-after-install check
2022-04-16 16:46:28 -04:00
Anthony Sottile
04de6a2e57
drop python 3.6 support
...
python 3.6 reached end of life on 2021-12-23
2022-01-18 18:44:20 -05:00
Anthony Sottile
a3e3b3d8aa
fix for rbenv used outside of pre-commit and language_version: default
2020-11-17 11:58:46 -08:00
Anthony Sottile
e05ac1e91f
don't call ruby install for language_version = default
2020-10-29 19:45:06 -07:00
Anthony Sottile
7f9f66e542
don't use system for ruby/node if it is a shim exe
2020-10-28 16:52:55 -07:00
Anthony Sottile
13eed4ac5b
Fix ruby hooks when --format-executable is in gemrc
...
I used this gemrc to break things (default on opensuse):
```yaml
---
:benchmark: false
:install: --format-executable --no-user-install
install: --format-executable --no-user-install
:backtrace: true
:update_sources: true
:format_executable: true
:verbose: true
:update: --format-executable --no-user-install
update: --format-executable --no-user-install
:bulk_threshold: 1000
:sources:
- https://rubygems.org
```
2020-09-18 09:13:19 -07:00
Anthony Sottile
e1e6a32c51
skip rbenv if ruby and gem are installed with default language_version
2020-06-15 13:50:47 -07:00
Thierry Deo
b44461da33
Unset GEM_PATH for ruby hooks
2020-05-10 12:12:15 -07:00
Anthony Sottile
67c1beb322
Use covdefaults to handle coveragerc
2020-02-29 14:25:19 -08:00
Anthony Sottile
fa8d022813
Remove unnecessary forward annotations
2020-02-07 08:32:39 -08:00
Anthony Sottile
755b8000f6
move Hook data type to a separate file
2020-01-15 14:20:51 -08:00
Anthony Sottile
df40e862f4
More miscellaneous cleanup
2020-01-13 11:47:34 -08:00
Anthony Sottile
5e52a657df
Remove unused ruby activate script
2020-01-12 13:39:53 -08:00
Anthony Sottile
327ed924a3
Add types to pre-commit
2020-01-12 10:15:01 -08:00
Anthony Sottile
fa536a8693
mypy passes with check_untyped_defs
2020-01-12 09:27:04 -08:00
Anthony Sottile
30c1e8289f
upgrade hooks, pyupgrade pre-commit
2020-01-12 09:27:04 -08:00
Anthony Sottile
7c3404ef1f
show color in hook outputs when attached to a tty
2019-10-12 23:17:36 -07:00
Anthony Sottile
d3b5a41830
Implement default_language_version
2019-01-05 13:15:23 -08:00
Anthony Sottile
b59d7197ff
Use Hook api in languages
2018-12-31 13:16:48 -08:00
Anthony Sottile
fe409f1a43
Remove stateful Runner
2018-12-26 22:33:21 -08:00
Anthony Sottile
435d9945a3
Switch from deprecated docs-off args to --no-document
2018-12-19 14:22:09 -08:00
Anthony Sottile
6bac405d40
Minor cleanups
2018-11-01 18:05:36 -07:00
Chris Kuehl
ba5e27e4ec
Implement concurrent execution of individual hooks
2018-10-24 16:16:10 -07:00
Anthony Sottile
9f60561d6f
Replace resources with importlib_resources
2018-10-14 14:37:35 -07:00
Anthony Sottile
7d87da8acd
Move PrefixedCommandRunner -> Prefix
2018-01-11 21:41:48 -08:00
Anthony Sottile
cff98a634d
Recover from invalid python virtualenvs
2017-07-20 10:57:09 -07:00
Anthony Sottile
be3fbdf94e
Upgrade add-trailing-comma to 0.4.0
2017-07-15 12:32:36 -07:00
Anthony Sottile
0c70fa4229
Use asottile/add-trailing-comma
2017-07-12 18:30:51 -07:00
Anthony Sottile
d876661345
Use a more intelligent default language version
2017-07-08 21:11:48 -07:00
Chris Kuehl
8f057b0b1b
Ignore bundle config files when running ruby hooks
2017-01-23 21:23:14 -08:00
Anthony Sottile
b6937f33e2
Fixups to make appveyor happy
2017-01-16 18:50:49 -08:00
Anthony Sottile
6055af8bc8
Make shlex behaviour of entry more consistent
2017-01-05 11:52:29 -08:00
Anthony Sottile
b81c9802ae
Remove py26 format literals
...
Resolves #403
2016-09-15 08:41:58 -07:00
Anthony Sottile
57cc50e0ad
Remove tarfile_open (tarfile open in 2.7+)
2016-08-31 16:24:30 -07:00
Anthony Sottile
e77bb8f3c3
Fix already using rbenv + default ruby. Resolves #369 .
2016-05-17 08:23:21 -07:00
Anthony Sottile
b7d395410b
Implement a simplified xargs in python
2016-03-25 11:21:50 -07:00
Anthony Sottile
a5b56bd9e3
Factor out bash and activate files
2016-03-25 11:21:50 -07:00
Anthony Sottile
2aaaddb5cc
Fail gracefully on undecodable install output.
2016-01-12 10:08:59 -08:00
Anthony Sottile
738c2ad7bd
Fixups + make the tests work
2015-11-20 13:52:20 -08:00
Tobias Macey
0ee4c3efa7
Added unit tests for dependencies
2015-11-20 15:45:34 -05:00