cabal-dev:找不到命令

时间:2017-04-10 17:33:50

标签: haskell cabal-dev

每当我运行包含 cabal-dev 的任何命令时,我都会收到以下错误:
cabal-dev:未找到命令
我已经从中下载了cabal-dev软件包 http://hackage.haskell.org/package/cabal-dev
但是没有关于如何安装它的说明。

1 个答案:

答案 0 :(得分:1)

它与MacOS有关。这个命令解决了这个问题。

copyNshort = () => {
    const bitly = new BitlyClient('...') // Generic Access Token bit.ly
    let txt = document.getElementById('link-result')

    bitly.shorten(txt.value)
        .then((res) => {
            this.setState({ shortedLink: res.url })

            if (this.state.shortedLink !== undefined) {
                document.getElementById('link-result-shorted').select() // get textarea value and select
                document.execCommand('copy') // copy selected
                console.log('The link has been shortened and copied to clipboard!')
                ReactDOM.render(<i className="fas fa-clipboard-check"></i>, document.getElementById('copied'))
            }
            console.log('Shortened link ', res.url) // Shorted url
        })
}

来源:https://stackoverflow.com/a/32053264/5524175