diff --git a/Dockerfile b/Dockerfile
index ba2f9db..c091f9c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,3 +19,5 @@ FROM base AS final
COPY --from=build-env /app/artifacts/http /root/.dotnet/tools/http
RUN ln -s /root/.dotnet/tools/http /root/.dotnet/tools/dotnet-http
ENV PATH="/root/.dotnet/tools:${PATH}"
+ENTRYPOINT ["http"]
+CMD ["--help"]
diff --git a/build.ps1 b/build.ps1
index f78ac38..cf9c09b 100644
--- a/build.ps1
+++ b/build.ps1
@@ -1,4 +1,4 @@
-dotnet tool update -g dotnet-execute --prerelease
+dotnet tool update -g dotnet-execute
Write-Host 'dotnet-exec ./build/build.cs "--args=$ARGS"' -ForegroundColor GREEN
diff --git a/build.sh b/build.sh
index fd2874e..cf8d84a 100644
--- a/build.sh
+++ b/build.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-dotnet tool update -g dotnet-execute --prerelease
+dotnet tool update -g dotnet-execute
export PATH="$PATH:$HOME/.dotnet/tools"
echo "dotnet-exec ./build/build.cs --args $@"
diff --git a/build/build.cs b/build/build.cs
index 2e1b048..0748286 100644
--- a/build/build.cs
+++ b/build/build.cs
@@ -12,6 +12,7 @@
var stable = ArgumentBool("stable", false);
var noPush = ArgumentBool("noPush", false);
var branchName = Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCHNAME") ?? "local";
+stable |= branchName is "master" or "main";
var solutionPath = "./dotnet-httpie.sln";
string[] srcProjects = ["./src/HTTPie/HTTPie.csproj"];
@@ -59,7 +60,7 @@ await BuildProcess.CreateBuilder()
.WithDependency("test")
.WithExecution(async () =>
{
- if (branchName == "master" || branchName == "main" || stable)
+ if (stable)
{
foreach (var project in srcProjects)
{
@@ -83,7 +84,7 @@ await BuildProcess.CreateBuilder()
if (string.IsNullOrEmpty(apiKey))
{
- // try to get apiKey from environment variable
+ // try to get apiKey from the environment variable
apiKey = Environment.GetEnvironmentVariable("NuGet__ApiKey");
if (string.IsNullOrEmpty(apiKey))
@@ -93,7 +94,7 @@ await BuildProcess.CreateBuilder()
}
}
- if (branchName != "master" && branchName != "main" && branchName != "preview")
+ if (!stable && branchName != "preview")
{
Console.WriteLine($"Skip push since branch name {branchName} not support push packages");
return;
diff --git a/build/version.props b/build/version.props
index 3c473c2..fc6464e 100644
--- a/build/version.props
+++ b/build/version.props
@@ -2,7 +2,7 @@
0
8
- 1
+ 2
$(VersionMajor).$(VersionMinor).$(VersionPatch)
$(PackageVersion)
diff --git a/src/HTTPie/Implement/HttpParser.cs b/src/HTTPie/Implement/HttpParser.cs
index fb4941d..8654d65 100644
--- a/src/HTTPie/Implement/HttpParser.cs
+++ b/src/HTTPie/Implement/HttpParser.cs
@@ -55,6 +55,10 @@ public async IAsyncEnumerable ParseFileAsync(string f
}
var (variableName, variableValue) = (splits[0], splits[1]);
+ if (variableValue.Length >= 1 && ((variableValue[0] == '"' && variableValue[^1] == '"') || (variableValue[0] == '\'' && variableValue[^1] == '\'')))
+ {
+ variableValue = variableValue.Length > 2 ? variableValue[1..^2] : string.Empty;
+ }
if (fileScopedVariablesEnded)
{
requestVariables ??= new();