Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denorg/is-wsl
Check if the process is running inside a WSL enviroment in Deno
https://github.com/denorg/is-wsl
deno denoland denorg typescript wsl wsl2
Last synced: about 2 months ago
JSON representation
Check if the process is running inside a WSL enviroment in Deno
- Host: GitHub
- URL: https://github.com/denorg/is-wsl
- Owner: denorg
- License: mit
- Created: 2020-07-01T20:54:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-01T22:11:56.000Z (over 4 years ago)
- Last Synced: 2024-10-28T12:15:29.622Z (about 2 months ago)
- Topics: deno, denoland, denorg, typescript, wsl, wsl2
- Language: TypeScript
- Homepage: https://denorg.github.io/is-wsl/
- Size: 9.77 KB
- Stars: 2
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Is Wsl
Check if the process is running inside a WSL enviroment in Deno.
[![Deno CI](https://github.com/denorg/is-wsl/workflows/Deno%20CI/badge.svg)](https://github.com/denorg/is-wsl/actions)
[![GitHub](https://img.shields.io/github/license/denorg/is-wsl)](https://github.com/denorg/is-wsl/blob/master/LICENSE)
[![Contributors](https://img.shields.io/github/contributors/denorg/is-wsl)](https://github.com/denorg/is-wsl/graphs/contributors)
[![Deno Starter](https://img.shields.io/badge/deno-starter-brightgreen)](https://denorg.github.io/starter/)
[![Made by Denorg](https://img.shields.io/badge/made%20by-denorg-0082fb)](https://github.com/denorg)
[![TypeScript](https://img.shields.io/badge/types-TypeScript-blue)](https://github.com/denorg/is-wsl)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)## ⭐ Getting started
Import the `isWsl` function and use it:
```ts
import { isWsl } from "https://raw.githubusercontent.com/denorg/is-wsl/master/mod.ts";const inWslEnviroment = await isWsl(); // boolean
```### CLI with [DPX](https://github.com/denorg/dpx)
After [installing DPX](https://github.com/denorg/dpx), you can directly use the CLI using the `dpx` command:
```bash
dpx --allow-read starter
```### CLI
Alternatively, you can use it directly from the CLI by using `deno run`:
```bash
deno run --allow-read https://raw.githubusercontent.com/denorg/is-wsl/master/cli.ts
```You can also install it globally using the following:
```bash
deno install --allow-read -n starter https://raw.githubusercontent.com/denorg/is-wsl/master/cli.ts
```Then, the package is available to run:
```bash
starter
```### Configuration
Required permissions:
1. `--allow-read`
## 👩💻 Development
Run tests:
```bash
deno test --allow-read
```## ⭐ Related Work
- [sindresorhus/is-wsl](https://github.com/sindresorhus/is-wsl) is the Node.js project serving as inspiration for this one
## 📄 License
MIT © [Denorg](https://den.org.in)
A project by Denorg, the world's first Deno-focused community
organization and consulting company. Work with us →