本文介绍了如何配置我的`travis.yaml``jobs.include`和`before_install`安装macOS堆栈?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尽管我已经执行了中所述的步骤说明
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
我的 travis.yaml 代码>
这些失败使用
jobs:
include:
...
- name: "LTS 9.6 (Haskell for macOS)"
os: osx
osx_image: xcode10
env: ...
...
使用
tar: Option --wildcards is not supported
Usage:
List: tar -tf <archive-filename>
Extract: tar -xf <archive-filename>
Create: tar -cf <archive-filename> [filenames...]
Help: tar --help
curl: (23) Failed writing body (0 != 597)
The command "curl -L https://www.stackage.org/stack/linux-x86_64" failed. Retrying, 2 of 3.
curl: (23) Failed writing body (0 != 597)
The command "curl -L https://www.stackage.org/stack/linux-x86_64" failed. Retrying, 3 of 3.
curl: (23) Failed writing body (0 != 597)
The command "curl -L https://www.stackage.org/stack/linux-x86_64" failed 3 times.
如何修改我的 travis.yaml
jobs.include
和 before_install
以便为macOS安装堆栈?
How do I modify my travis.yaml
jobs.include
and before_install
to install stack for macOS?
推荐答案
几件事.
- 我不会在这里使用
travis_retry
,因为curl
具有-retry
标志效果更好. - macOS使用BSD
tar
,而不是GNUtar
.您可以:
- I wouldn't use
travis_retry
here, sincecurl
has the--retry
flag that works better. - macOS uses BSD
tar
, not GNUtar
. You can either:
- 找到可同时在两者上使用的通用标志
- 安装
gnu-tar
并使用反而.(如果要以tar
的身份执行此公式,则不仅需要brew install gnu-tar
,还请务必正确设置.)
- Find a common flag that works on both
- Install
gnu-tar
, and use that instead. (This formula requires more than justbrew install gnu-tar
, if you want to execute it astar
, so be sure to set it up correctly.)
这篇关于如何配置我的`travis.yaml``jobs.include`和`before_install`安装macOS堆栈?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!