Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# nim-debug-adapter

[![Build Status](https://img.shields.io/badge/build-passing-green)](https://github.com/nim-analyzer/nim-debug-adapter)
[![Build Status](https://img.shields.io/badge/build-passing-green)](https://github.com/jasagiri/nim-debug-adapter)
[![Test Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](./tests/)
[![Version](https://img.shields.io/badge/version-0.1.0-blue)](./nim_debug_adapter.nimble)
[![License](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
Expand All @@ -11,7 +11,7 @@ A robust Debug Adapter Protocol (DAP) implementation for Nim, providing advanced

```bash
# Clone and build
git clone https://github.com/nim-analyzer/nim-debug-adapter.git
git clone https://github.com/jasagiri/nim-debug-adapter.git
cd nim-debug-adapter
nimble build

Expand Down
19 changes: 14 additions & 5 deletions scripts/test_safe.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/bin/bash
#!/usr/bin/env bash

set -o nounset # Fail when using an unset variable. To use a variable that may or may not have been set, use "${varname-}" or "${varname-Some alternative value}" instead of "${varname}".
set -o errexit # Exit immediately if a command exits with a non-zero status.
set -o pipefail # (Bash only) Fail if ANY command in a pipeline fails. Otherwise, $fail_cmd | $handles_fail_too_well_cmd does not fail. We do want that to fail.
# set -o xtrace # Print commands and their arguments as they are executed.


# Safe test runner that temporarily disables external dependencies

set -e # Exit on error

NIMBLE_FILE="../nim_debug_adapter.nimble"
BACKUP_FILE="../nim_debug_adapter.nimble.backup"
dir_of_this_script="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "${dir_of_this_script}"

NIMBLE_FILE="${dir_of_this_script}/../nim_debug_adapter.nimble"
BACKUP_FILE="${dir_of_this_script}/../nim_debug_adapter.nimble.backup"

echo "Creating backup of nimble file..."
cp "$NIMBLE_FILE" "$BACKUP_FILE"
Expand All @@ -24,4 +33,4 @@ echo "Running nimble test..."
cd ..
nimble test

echo "Tests completed successfully!"
echo "Tests completed successfully!"