hyper: Hyper breaks laravel valet share

  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate

Issue

When trying to use Laravel’s valet share command in Hyper it throws the following error:

ERROR:  Tunnel 'command_line' specifies an invalid or malformed address 'XXXXX:80': strange hostname

The command works fine in the native macOS Terminal and other terminal apps. More info about the issue/error can be found here: https://github.com/laravel/valet/issues/790#issuecomment-522358081

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 17 (1 by maintainers)

Most upvoted comments

@LabhanshAgrawal

  1. Install Laravel valet as per the instructions of the docs: https://laravel.com/docs/8.x/valet
  2. Download or clone a php project, for example Kirby’s starterkit: https://github.com/getkirby/starterkit
  3. Open hyper and cd into the php project
  4. Type valet share into hyper to reproduce the error.

Doing the same with the nativ MacOS Terminal will create the desired result.

Might be related to TERM? It’s probably an issue of differing environments between Terminal and Hyper.

@kms-rscholz thanks for the guide I’m able to reproduce this The error seems to be because of ansi color codes see cpriego/valet-linux#221 In Hyper Screenshot 2021-01-22 at 10 08 10 In Terminal Screenshot 2021-01-22 at 10 10 54

I tried again after replacing $TLD with test in ~/.composer/vendor/laravel/valet/valet and it started working.

I’m not sure why it’s returning normal output in terminal and colored in hyper.

I’ve also compared environment variables to see if we’re setting something which is causing this.

It gives normal output in Terminus and VS Code terminal.

This behavior also seems to sort of propagate down, if I run it in xterm.js demo started from hyper it gives colored output, and if started from terminal it gives normal output

@Tyriar can you please help us out a bit here, if we might be doing something wrong while using node-pty to start the shell or something else.

I don’t have any other clue to push ahead. (Should’ve studied a bit on unix :sigh: 😛)