Skip to content

Commit

Permalink
Fix pipe in SSH (scalacenter#757)
Browse files Browse the repository at this point in the history
* fix ssh pipe
  • Loading branch information
rochala authored Feb 6, 2023
1 parent 382039a commit a426cc4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Start mongodb
uses: supercharge/[email protected]
- uses: nixbuild/nix-quick-install-action@v5
uses: supercharge/[email protected]

- uses: cachix/install-nix-action@v19
with:
nix_path: nixpkgs=channel:nixos-22.11
- name: Run tests
run: |
nix-shell --command "sbt -DSnippetsContainerTest.mongo=true cachedCiTest"
30 changes: 15 additions & 15 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
with import (builtins.fetchGit {
name = "nixos-unstable-2021-11-15";
url = "https://github.com/nixos/nixpkgs/";
ref = "refs/heads/nixos-unstable";
rev = "931ab058daa7e4cd539533963f95e2bb0dbd41e6";
}) {};

with (import <nixpkgs> {});

stdenv.mkDerivation {
name = "scastie";

buildInputs = with pkgs; [ sbt nodejs yarn bash ];

SBT_OPTS = "";

shellHook = ''
alias cls=clear
'';
}
buildInputs =
let
sbtWithJRE = pkgs.sbt.override {
jre = pkgs.jdk17_headless;
};
in
[
pkgs.nodejs
pkgs.yarn
pkgs.bash
sbtWithJRE
];
}
4 changes: 2 additions & 2 deletions project/Deployment.scala
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ class Deployment(
def compareScriptWithRemote(scriptPath: Path): Boolean = {
val uri = s"${config.userName}@${config.runnersHostname}"
val remoteScriptPath = scriptPath.getFileName().toString()

val exitCode = Process(s"ssh $uri cat $remoteScriptPath | diff - $scriptPath") ! logger
val exitCode = Process(s"ssh $uri 'cat $remoteScriptPath'") #| ("diff - $scriptPath") ! logger
logger.info(s"EXIT CODE $exitCode")
exitCode == 0
}

Expand Down

0 comments on commit a426cc4

Please sign in to comment.