Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You are right! I missed that. The number of bugs to lines of code ratio is approaching one.


The following line is quite widespread in use, but not as portable as it could be:

    #!/bin/bash
For increased portability, respect users' PATH environment variable using:

    #!/usr/bin/env bash
Using #!/bin/bash could lead to subtle bugs on systems with more than one version of bash installed, or outright breakage on systems where bash isn't installed at /bin/bash. (OpenBSD is known to use /usr/local/bin/bash, for example.)


That isn't a Copilot bug though, it was typed by a person.


I wonder if copilot would have produced better code if the user had used /usr/bin/env instead. If you already have buggy code, will copilot also suggest buggy code?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: